C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » ASP.NET »

TextBox value disappears after couple clicks


Posted Date: 03 Nov 2009      Posted By: urpalshu      Member Level: Gold     Points: 1   Responses: 2



I just came accross this vierd situation, and thought I'll ask you why it's happening.Not sure if it is a bug of some kind

Well It's about the Accordion again.

1. I am providing the user to choose between Accordion View and Full View( no Accordion).
To achieve this i have two listviews visible property toggled.

2. I have a button which displays their choice of view.

3. I have a textbox for Quantity which the user can key in. If the user changes his view to fullview, I need to retain what he keyed in.

It works just fine the first couple times, but on the fourth click the data disappears.

Please could you tell me how I could avoid the loss of data between clicks.

Please try and get back with me ASAP.


protected void Button3_Click1(object sender, EventArgs e)
{
if(A)
DataTable table = CopyDataTableValues from 1ListView to 2ListView
else
CopyDataTable Values from 2ListView to 1ListView

}


Thank you,





Responses

Author: venkatesan    03 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

By default the textbox doesnt lost his value - as his enableViewState is set to TRUE.

check the Enableviewstate of the control

if this happens use ViewState to hold the textbox value across postback.

Regards,
M.Venkatesan.
Dot Net Code Snippets



Author: urpalshu    05 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

My AJAXToolkit needed an updated version. It worked great after the update.

Thanks



Post Reply
You must Sign In to post a response.
Next : Url Change
Previous : Mail sending in telnet
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use