Postback problem

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

Guest

We have created an ASP.NET application in C#. on a couple of the pages we use
datagrid to display user records. one of the columns on this record is to
view an images which is displayed in a separate popup window. But while I am
clicking first time nothing is happening and displays the images only on the
second click. Can you figure it out why it is happening so? I want the images
to be displayed on the first click itself.

Regards,
 
According to my experience, this problem usually occurs when you bound
ur script for popup on click event instead of Page_Load event. What i
mean is, you must b having a code say:

Button1.Attribute.Add("Onclick", "Window.open("TargetPage.aspx");

This code must be put in Page_Load or in ur case in ItemDataBound event
instead of click event or ItemCommand event. Please check if u r
binding this script code in ItemDataBound this might solve ur problem.

HTH
 

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

Back
Top