Coding Villa Forum
FAQs
Advertisements

Why GridView is repeating data rows in Asp.net 3.5?

Iram Online 5/9/2012 3:14:14 PM

Hello Friends!

I am working on as asp.net website. My website contains a page to display submitted article list according to a specific userid. I have used GridView control to display list of articles. GridView is displaying article list however, the problem is that it is displaying repeated data rows. Whats the reason behind that repetition. Please friends guide me how can I resolve that issue.

Waiting for your guidance

Thanks

Share with Friends

Advertisements

Answer

Mehmood Online 5/12/2012 2:14:50 AM

Dear iram,

If repetition happens on each pressing the refresh button of browser then you should use ISPostBack property of page like I mentioned below:

if(!Page.IsPostBack)
{
   //Control Initialization
   //Databinding
}

If it doesn't happens on refreshing the page then you should check your bound collection with GridView.
Share with Friends

Post reply

 

Enter This Code
Captcha
 

Subscribe

Email me when people reply


Subscribe to the