Click here to Skip to main content
15,916,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an html page containing a textbox with a user name.

A button on the above page uses "window.open" to open an aspx popup which is going to display the user's profile information for editing.

I need to query my database in the aspx.cs's "Page_Load" function to populate the aspx page with the user's information.

Question: How do I get the user's name to the Page_Load function so I can run the SQL query?

Thanks

What I have tried:

The aspx.cs page doesn't know about "window.opener..." so I can't access the html page's elements through that.
Posted
Updated 12-Feb-19 10:25am
Comments
MadMyche 12-Feb-19 10:24am    
Really need some more details on this... is the site using Windows Authentication or is there some type of login system?
ZurdoDev 12-Feb-19 11:03am    
using window.open set the value in the querystring.
Richard Deeming 12-Feb-19 13:39pm    
Sounds like the answer to me. Have a virtual +5! :)

1 solution

One way to do it is in the window.open() method add the userid to the querystring. Then the page that is being opened can get the value from the querystring.
 
Share this answer
 
Comments
patrickge 13-Feb-19 15:43pm    
Perfect - Thank You!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900