473,396 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

ASP .Net ViewState issue

29
I have a textbox placed in a updatepanel, i have written a textChanged event that gets fired when user types something.
Now i have set the enableViewState property of the TextBox to FALSE
<asp:TextBox ID="txtName" runat="server" AutoPostBack="True"
ontextchanged="txtName_TextChanged" EnableViewState="false" CausesValidation="false"></asp:TextBox>
so what happens is on every postback the textChanged event gets fired.
i would like to block this, while i keep the viewstate property of the textbox to false

any solution?

thanks
Tim
Jun 17 '08 #1
4 1597
tim007
29
When i Said the textChanged event gets fired on every PostBack i ment
It gets fired on any click on any other control on that page.

pls advise
Jun 18 '08 #2
tim007
29
hmmmm so i guess this is a knw issue


No answers :-)



thanks anyway :-)
Jun 27 '08 #3
nmsreddi
366 256MB
Hello ,

As you make Autopost back property true, naturally it happens ,

is there any specific use for you ,to make as auto post back.

try making that property as False

Regards
nmsreddi
Jun 27 '08 #4
Frinavale
9,735 Expert Mod 8TB
I have a textbox placed in a updatepanel, i have written a textChanged event that gets fired when user types something.
Now i have set the enableViewState property of the TextBox to FALSE
<asp:TextBox ID="txtName" runat="server" AutoPostBack="True"
ontextchanged="txtName_TextChanged" EnableViewState="false" CausesValidation="false"></asp:TextBox>
so what happens is on every postback the textChanged event gets fired.
i would like to block this, while i keep the viewstate property of the textbox to false

any solution?

thanks
Tim
Your question doesn't make sense to me.
You have a textbox which has it's ViewState disabled.....

This should have no effect on your textChanged event getting fired.
The TextChanged event will only get fired if your textbox's autopostback is set to true.

When you disable the textbox's ViewState, the textbox will not retain it's value when the postback occurs. This means that you have to always set the textbox's Text property so that this information isn't lost...

Could you please rephrase your question and provide more details on what your problem is?

-Frinny
Jun 27 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ben Rush | last post by:
Hello World, Okay, I have spent the day browsing the newsgroups and reading up on article after article concerning ViewState corruption and so forth, and I have a couple questions. We...
8
by: Invalidlastname | last post by:
Hi, We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue...
2
by: Jay Walker | last post by:
I created a custom DataGridColumn based on Marcie Robillard's MSDN Article: Creating Custom Columns for the ASP.NET Datagrid...
5
by: Dominic | last post by:
My question is about how to maintain view state in mobile ASP.NET across postback / request in a web farm environment. First of all, let's assume the web-farm does NOT use stick-session feature....
6
by: clsmith66 | last post by:
Is it possible to store the same information about a control that would be saved in the ViewState in a Session state? I have a page with three treeview controls and if I enable the view state for...
2
by: Steve Pierce | last post by:
I am having some issues with a runtime dropdownlist in a datagrid. The issue is that I cannot get ViewState to fill the selected index of a runtime dropdown properly on postback. I do not want to...
9
by: Jamie | last post by:
I am receiving an Invalid ViewState error after posting back to the same page twice. Consistently the error occurs after the second postback and not after the first. I have looked into creating...
7
by: GS | last post by:
Hello, I'm receiving The state information is invalid for this page and might be corrupted error message when running code below. This happens on second post back. Why is it happening? My...
9
by: HK | last post by:
My website emails me when it raises an exception. I'm getting about 10 emails per day that look similar to this, but in each, the IP address and port, and the email-looking stuff, are different. ...
0
by: aspvan | last post by:
I am experiencing intermitent viewstate exceptions,Error 4009, mostly on pages with large viewstate. I already tired a) viewStateEncryptionMode="Never" b) validateRequest="false" c)...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.