.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

PopUp refreshing

Posted By: Aamrapali Tamgadge     Posted Date: March 02, 2011    Points:2   Category :ASP.Net
i m creating a online test website.
when the candidate login he is presented to a pop up window for test..
when he clicks inside the popup for giving answers and moves to next section of the test, the answers of the previous section are resetted...the data is lost..
how can i avoid this???
the code which i have used to generate the popup is as below:

string popup = "<script language='javascript'>" + "window.open('Test.aspx?name=" + Session["Result"].ToString() + "&id=" + Session["ID"].ToString() + "&time=" + lblDuration.Text + "&marks=" + Session["TotalMarks"].ToString() + "&test=" + lbTestName.Text + "','CustomPopUp', " + "'resizable=no')" + "return false" + "</script>";
Page.RegisterStartupScript("popup", popup);

Responses
Author: Raga             
Posted Date: March 02, 2011     Points: 20   

I feel this issue is due to page refresh. This is independent of popup functionality. Are you doing a server postback when you are moving to next section?

Author: Aamrapali Tamgadge             
Posted Date: March 02, 2011     Points: 20   

Hello Sir.I have given if (!IsPostBack)then i have bind all the gridviews but still my page is getting refresh..i have write all the content in update panel also but still i cant gettin wat is happning exactly..

Software Programmer At OTIS ISRC
Author: Aamrapali Tamgadge             
Posted Date: March 02, 2011     Points: 20   

Hello Sir.I have given if (!IsPostBack)then i have bind all the gridviews but still my page is getting refresh..i have write all the content in update panel also but still i cant gettin wat is happning exactly..

Software Programmer At OTIS ISRC
Author: Maverick             
Posted Date: March 04, 2011     Points: 20   

<Triggers>
<asp:PostBackTrigger ControlID="lnkAddFiles" />
<asp:PostBackTrigger ControlID="lnkDownload" />
<asp:PostBackTrigger ControlID="lnkBtnDownload" />
<asp:PostBackTrigger ControlID="ImgFile" />
</Triggers>
YUse the above in ur update panel with async property of ur button.
Hope it helps.
Thanks,
Maverick

Thanks,
Maverick
Author: Karthikeyan Anbarasan       [Moderator]      
Posted Date: March 04, 2011     Points: 20   

Hi,

Save the data to a view state and make use of it in the next page!!!

Thanks
Karthik
http://www.f5debug.net
Mark as Answer if the answer solves your issue!!!


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend