Getting the user input in a separate popup browser...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, in an ASP.NET page, when the user selects certain button, I would like
a small browser window to popup and ask user for some input. Once the user
enters the data and submits through a button, I would like that data to be
available to the aspx webpage.
What needs to be done, and is a small template available for it somewhere?

Thanks in advance
-Ravi
 
Hi Ravi,

You can make use of Server.Execute method to achive your need.

Server.Execute("TargetPage.aspx",Writer).

The following example executes the aspx page "Login.aspx" on the server in
the current directory and receives the output from the page through the
StringWriter object writer. It writes the HTML stream received from writer to
the HTTP output stream.

StringWriter writer = new StringWriter();
Server.Execute("Login.aspx", writer);
Response.Write("<H3>Please Login:</H3><br>"+ writer.ToString());

Cheers,

Jerome. M
 
Ravi,

This is a client-side task. You have to use javascript call
showModalDialog(...) to call the page for input. The page can pass entered
data back in returnValue property. The parent page will get data as a result
of showModalDialog call. After that, the data can be placed in a hidden text
input for transferring to server-side.

Eliyahu
 
Back
Top