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

    GridView - Dynamically added Itemtemplate control value not fetching

    Hai All,

    May I know any solution for below senario
    I have added itemtemplate controls dynamically. worked fine
    but I entered the value for the control(textbox) in gridview, that value not visible when postback

    Thanks and Regards,
  • #761215

    This may be because you have not bind your text box value to some state management methods.

    If you donot have any hidden field,view state or session how will the page or textbox hold back the value between postbacks.

    If it is for the same page postback, i would suggest you to use a viewstate to store the value.

  • #761218

    You can go through Below link for dynamic created control fetch the data

    Name : Dotnet Developer-2015
    Email Id

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #761229
    Hi chellappan,

    Yes, it is happen because of postback after postback values remains zero. You need to maintain state using several state controls available in .net or else better to create template in gridview and based on condition you can show or hide to user.

    Give respect to your work, Instead of trying to impress your boss.

    Blog :

  • #761230
    i think you need to add the control in update panel.
    Do Good... Enjoy your life.....

Sign In to post your comments