Gridview dynamic controls viewstate

Posted by Shobha under ASP.NET on 10/23/2009 | Views : 2534 | Status : [Member] | Replies : 1
Hi,

I am dynamically genrating controls in gridview , on a click of a button, the page is loaded and all the controls are lost. I checked by enabling the viewstate property for each dynamic control but its not working.Please let me know how to retain all the controls on the page and also their state.


Thanks in advance




Responses

Posted by: Vuyiswamb on: 10/23/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Check for


if(!Page.IsPostback)
{
....Do what they Button is Suppose to do
}


Thank you for posting at DotnetFunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Shobha, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response