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

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
 
G

Guest

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
 
E

Eliyahu Goldin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top