You must Sign In to post a response.
  • Category: ASP.NET

    Dynamic control value not accessible on btn click

    Dear all
    I have gridview in which I have added text box control t run time.
    I have done this successfully.I have created this control at pageload event also.
    But when i add some value in text box and i try to save i get nullexception.
    what should i do?
    please help...
  • #762726
    Probably you are creating gridview control at page_load event under if(!IsPostBack) section and so on button click this code does not get executed.

    Try to create gridview dynamically in Page_Init event or Page_Prerender event. Thanks

    Regards
    Pankaj Rajput

  • #762728
    Hi

    Share your code so that we can make it solved, to get data even after postback. Dont post only event code instead post the total code.

    Sridhar Thota.
    Editor: DNS Forum.


Sign In to post your comments