xrosem
asked on
Pass information from winform to webform to display info on webform.
Is there a way in visual basic .net to pass information from a windows form to a webform when a user clicks a button on the winform. I need to send the correct data to the webform to display information that pertains to the winform. I appreciate any help in this matter, thanks.
Mike
Mike
ASKER
I would like the winform to popluate the webform fields.
ASKER
On the later part where you click a button on the winform how does that code give the webform the information.
Dim URL as string = String.Format("http://www.mywebsite.com/MyPage.aspx?Data1={0}&Data2={ 1}", 190, "catalog")
Process.Start(URL) 'Kick off default browser to URL listed.
Is data1 and data2 string variables and they get passed? Then you reference the variables on the webform when it is open?
I appreciate your help.
Dim URL as string = String.Format("http://www.mywebsite.com/MyPage.aspx?Data1={0}&Data2={
Process.Start(URL) 'Kick off default browser to URL listed.
Is data1 and data2 string variables and they get passed? Then you reference the variables on the webform when it is open?
I appreciate your help.
ASKER
It states that process is not declared. What do i need to declare it as to get the page to fire? Or what is the process.start?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry...the Process object is part of System.Diagnostics
So either add "Imports System.Diagnostics" outside your class or explicitly call it out as:
System.Diagnostics.Process .Start(bla h blah)
So either add "Imports System.Diagnostics" outside your class or explicitly call it out as:
System.Diagnostics.Process
The "?" after the page name tells the the URL parser that there are query strings in the URL. That is what populates the Request Object's Querystring collection.
ASKER
ptakja, thanks it worked great. You are truly awsome!!! Thanks a bunch.
Mike
Mike
IF the latter, you can use QueryStrings to pass the info:
In your WINFORM app when the button is clicked:
Dim URL as string = String.Format("http://www.mywebsite.com/MyPage.aspx?Data1={0}&Data2={
Process.Start(URL) 'Kick off default browser to URL listed.
In this example, your default browser would open to the page specified.
Then in your WebForm page named "MyPage.aspx" you would have some code to pull the QueryString data:
Data1 = 190
Data2 = "catalog"
from this then you can fill fields on the form, or perform db lookups, etc...