*** Sent via Developersdex http://www.developersdex.com ***Hi,
In the Page_Load method I set the following:
myButton.Attributes.Add("onclick",
"javascript:window.open('myPage.aspx', 'My Page', 'resizable=yes,
scrollbars=yes, status=yes')");
On clicking, a new window is being opened. Thats working preety good.
Now I need to pass arguments to this new window. I was thinking of
using:
Session["varName"] = data;
But for me its not correct way to do it, because the user may open two
or more of these windows simultaneously and so the previous data would
be overwritten with the new data. Also, I require the data to be passed
to be available all the time while the window is open.
Can someone give me some help on this problem.
Thanks in Advance
*** Sent via Developersdex http://www.developersdex.com ***
Hello xarky d_best,
First off, because you're using the second parameter to window.open ('My
Page'), you'll be targetting a named window. As such, the user will not have
two windows opened up. The second attempt to open the window will result
in the first popup window being refreshed.
Assuming you resolve that, can you pass it on the querystring? Also, there's
a great article [1] at codeproject.com that talks about ProcessContext. This
may also handle what you need to do.
[1] http://www.codeproject.com/useritems/ProcessContext.asp
--
Matt Berther
http://www.mattberther.com
> Hi,
> In the Page_Load method I set the following:
> myButton.Attributes.Add("onclick",
> "javascript:window.open('myPage.aspx', 'My Page', 'resizable=yes,
> scrollbars=yes, status=yes')");
> On clicking, a new window is being opened. Thats working preety good.
> Now I need to pass arguments to this new window. I was thinking of
> using:
> Session["varName"] = data;
> But for me its not correct way to do it, because the user may open two
> or more of these windows simultaneously and so the previous data would
> be overwritten with the new data. Also, I require the data to be
> passed to be available all the time while the window is open.
> Can someone give me some help on this problem.
> Thanks in Advance
> *** Sent via Developersdex http://www.developersdex.com ***
0 comments:
Post a Comment