| | |
WPF WebBrowser Control
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
I have a php website which i want to run in C# wpf webbrowser control.
I have a validated a username and password for the site by connecting to it's database using .net.
Now i want the functionality to take username and password and submit the post form to php page that will validate the username and password again(of course it is already validated) or not validate and send the user to the page that it needs to redirect. and i want that page to be seen in my webbrowser control.
How do i do this.
I have a validated a username and password for the site by connecting to it's database using .net.
Now i want the functionality to take username and password and submit the post form to php page that will validate the username and password again(of course it is already validated) or not validate and send the user to the page that it needs to redirect. and i want that page to be seen in my webbrowser control.
How do i do this.
My Personnel Blog:dotnetworker.blogspot.com
My Company:http://www.bizpersonnel.com
Blog:http://bizpersonnel.wordpress.com
My Company:http://www.bizpersonnel.com
Blog:http://bizpersonnel.wordpress.com
•
•
Join Date: Oct 2009
Posts: 7
Reputation:
Solved Threads: 1
0
#2 Oct 30th, 2009
Have you tried modifying the DOM to include JavaScript for form submitting, and then doing it like that? You can invisible DIV over the entire page and onmouserover it if you can't do it from the control itself. If you have access to the DOM through the web browser control in WPF the sky's the limit. Oh, and to answer that question for you:
http://rhizohm.net/irhetoric/blog/72/default.aspx
You have control.
http://rhizohm.net/irhetoric/blog/72/default.aspx
You have control.
•
•
•
•
I have a php website which i want to run in C# wpf webbrowser control.
I have a validated a username and password for the site by connecting to it's database using .net.
Now i want the functionality to take username and password and submit the post form to php page that will validate the username and password again(of course it is already validated) or not validate and send the user to the page that it needs to redirect. and i want that page to be seen in my webbrowser control.
How do i do this.
ITSVPS.com Virtual Servers - Cutting edge technology, first class network, affordable prices! Managed and unmanaged. Virtual and Dedicated. Shared hosting, web design, application development, and more. Contact us here, or our website!
I found the solution.
Thank you
Thank you
My Personnel Blog:dotnetworker.blogspot.com
My Company:http://www.bizpersonnel.com
Blog:http://bizpersonnel.wordpress.com
My Company:http://www.bizpersonnel.com
Blog:http://bizpersonnel.wordpress.com
•
•
Join Date: Oct 2009
Posts: 7
Reputation:
Solved Threads: 1
0
#4 Nov 1st, 2009
Could you share with us?
ITSVPS.com Virtual Servers - Cutting edge technology, first class network, affordable prices! Managed and unmanaged. Virtual and Dedicated. Shared hosting, web design, application development, and more. Contact us here, or our website!
0
#5 Nov 1st, 2009
There is myWebBrowser.NavigateToString method in which we can pass the string that consist of a web form and a javascript function which submits the form when it loads, for example the code is given below:
C# Syntax (Toggle Plain Text)
string documentText = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" + "<html xmlns=\"http://www.w3.org/1999/xhtml\">" + "<head>" + "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />" + "<title>Untitled Document</title>" + "<script type=\"text/javascript\">" + "function SubmitForm()" + "{" + " document.forms[0].submit();" + "}" + "</script>" + "</head>" + "<body onload=\"SubmitForm()\">" + "<form id=\"form1\" name=\"form1\" method=\"post\" action=\"http://www.mywebsite.com/index.php\">" + "<h1>Loading....</h1>" + "<input type=\"hidden\" id=\"txtUsername\" name=\"txtUsername\" value=\"" + txtUserName.Text + "\" />" + "<input type=\"hidden\" id=\"txtPassword\" name=\"txtPassword\" value=\"" + txtPassword.Password + "\" />" + "<input type=\"hidden\" value=\"Sign In\" />" + "</form>" + "</body>" + "</html>"; myWebBrowser.NavigateToString(documentText);
My Personnel Blog:dotnetworker.blogspot.com
My Company:http://www.bizpersonnel.com
Blog:http://bizpersonnel.wordpress.com
My Company:http://www.bizpersonnel.com
Blog:http://bizpersonnel.wordpress.com
![]() |
Other Threads in the C# Forum
- Previous Thread: Get the column values from the SQLite database
- Next Thread: Network programming Issue C# TCP
| Thread Tools | Search this Thread |
Tag cloud for c#, form, php, post, webbrowser, wpf
.net access ajax array asp asp.net basic beginner bugs c# chat checkbox class cms code combobox data database date development display download drawing dropdown email error feedback file files flash form forms function gdi+ google html image include insert internetexplorer java javascript jquery limit linux list listbox login mail math menu mysql newbie news oop open oracle password paypal photoshop php picturebox post problem programmer programming quality query remote resource richtextbox saving script search security server session sms soap sql string textbox treeview tutorial upload usercontrol validation vb vbulletin video visual web webbrowser webdesign windows winforms wpf xml youtube zend






