Viewstate not getting reapplied unless textbox is readonly

Hi All

I have this strange issue while dynamically loading a usercontrol onto a page a doing a post back from one of the controls on the control.  I'm writing an application that automates the request/approval process of access to applications with the company.  I've built an Outlook type interface using Telerik controls and I dynamically load a usercontrol into the interface dependant on what kind of application needs approval.  My problem is; when I open an existing request (so I load the control and populate it from SQL in the OnInit Page event) and then if one of the controls performs a postback the textboxes in the control loose thier text, unless they are set to readonly.  Has anyone seen this behaviour before.  I've read lots of articles which state the control should be loaded in the Oninit event prior to the Viewstate getting deserialized, so this is exactly what I do.  Any help would be great as I've been battling with this for 3 days now.

 Thanks

 DB

0
Delboy
11/15/2006 9:20:27 AM
asp.net.state-management 8807 articles. 0 followers. Follow

0 Replies
599 Views

Similar Articles

[PageSpeed] 41

Reply:

Similar Artilces:

Getting viewstate value from readonly textbox in .NET2 (VB)
Hey guys...I have a form that asks for several dates.  I tried using asp calendar controls to set values of the date textboxes which were readonly.  I found this annoying since each time I advanced a month and/or selected any date, it posted back and refreshed the page. So, instead, I resorted to an old javascript function I use a lot.  The javascript creates a pop up (html) window and sets the value of the textbox when the user picks a date.  I had done this many times in ASP.NET1.  However, since upgrading to .NET2, I noticed I was getting errors and the data I was...

How to get textbox value when textbox properties is readonly or enabled false
Hi ,I have one problem, If u have idea please solve  itTo dispaly canlendercontrol iam using ajax canlender control, after selecting dateof birth into textboxIn textbox keeping textbox properites as readonly or enabled equal false,  getting that textbox value into lable,  ThanksRamesh  Just get the Textbox.Text value?Don't forget to click "Mark as Answer" on the post that helped you. If I understand you correctly, you have a textbox that is disabled/readonly. You use some code to change the value in the textbox, and you want that value to be returne...

Not able to get textbox value from aspx to aspx.cs file if ReadOnly="True" for a textbox
Hi, I got a problem in .Net 3.5. Lets see my requirement... a) I have a web page with two text boxes with an image beside the first text box. When I click on the image some opertation will happen in Javascript and a popup with calender should appear and I can select a date from that. After that I will get the selected date to my aspx file with document.getElementID().value. And I will keep it into a string and then I will add 3 more days to it and will print that value in another textbox. b) When a value is selected or changed in the first textbox then TextChang...

State Management; .Net Profiler
Here is the situation with the customized profiler. I got a profiler class called SSOProfileProvider inheriting from ProfileProvider. I've implemented the Initilization, GetPropertyValues and SetPropertyValues. The Get... and Set.. are making a call to the database to store profile into the database. This class has been stored in the separate DLL called "Security.DLL" and there is a web site that is using this dll. The web.Config for this website is as follow:<profile enabled="true" inherits="AppProfileBase" defaultProvider="SSO" automat...

getting the value of a postback for a readonly textbox
hi guys, i have a textbox, i set as readonly or disabled. But when i do a postback, i cant seem to read the value of the textbox, either when disabled or postback is used. I tried adding this  TextBox_Groups.Enabled = true;        TextBox_Groups.ReadOnly = false; but it still doesnt work, pls help Ehi  The ReadOnly or the disabled TextBox will ingore the Newly submitted value , However , you can get the new value like this :TextBox1.Text=Request.Form(TextBox1.UniqueId)Read my blog post for more information. Regards,Anas Ghanem.Note:Please ...

How get viewstate of a TextBox inside DataList
Hi. I have a datalist with a Name and E-mail textbox inside it. I must use the datalist, there´s no way I can use a panel, for ex. The problem is that I can´t retrieve the textboxs text properties when the page is posted back Below is a simplified itemtemplate of my datalist. How can I assign each textbox .text values?? <ItemTemplate> NAME:<BR> <asp:TextBox id="Name" runat="server"></asp:TextBox><BR> E-MAIL:<BR> <asp:TextBox id="Email" runat="server" ></asp:TextBox<...

Alternative for Viewstate to store Dataset? + State management
Hi,         In my application, we are handling dataset/datatable to enable the gridview paging/sorting functionality. hence the dataset/datatabel object are stored in Viewstate to avoid the DB call on every page click or sorting. Now the problem is viewstate size, because in my application we may have more than one gridview so that the datset size also increased and viewstate size also increased to 1 MB.                1. How to reduce the viewstate size? or What is gobal norms for Vie...

ReadOnly Textbox doesn't remember its viewstate?
I have the latest ASP.NET 2.0 Release and I thought this problem was fixed.  When I set the textbox ReadOnly property to True, the textbox doesn't remember its value.  I change the value on the clientside via javascript.  Either I'm misunderstanding your problem or I can't reproduce it.  A security fix we made is that readonly textboxes only get their values from ViewState (and not the submitted value).  If the value is changed on the client through javascript, it should not persist in the viewstate.  Here's a demo I put together:<%@ Page Language="VB" %>...

Setting of ReadOnly property for a Textbox inside Datagrid in .NET
Can anybody help me how to make a textbox inside a Datagrid as ReadOnly dynamically based on change of values of a dropdown list also present inside the datagrid in .NET? I think you could do this in the DataGrid's ItemCreated event. Add the SelectedItemChanged event handler delegate to the DDL in the ItemCreated event. Make sure that you get hold of the Item and the TextBox control within it and to enable/disable it based on the selected data in your DDL.hth Shravan Addaypally MCP Hi,I am new to .NET and not able to understand the solution. Can you please kindly explain with the he...

Get values set by javascript to .net enabled textbox
I have a bit of javasript that writes a value to a text box.  The text box is read only. Textbox code:<input type="text" id="txtColor1" runat="server" readonly="readonly" size="6" /> Snippet from javascript functioncolorBox = document.getElementById('<%= txtColor1.ClientID %>');colorBox.value = colorCode;  Code behind:string color1 = txtColor1.Value Whenever I attempt to get the value out of the text box after it has been changed by the javascript, it always reverts back to the old data and not the new. Anyo...

VB.net add textbox values together to get total
Hi Guys Im using visual studio 2005 vb.net. sql express, im a newbie and im basically trying to create a customer calculator. Ive got this code, basically i want to add the integer values of each of my text boxes together and then display them in a textbox called textbox1.  I think i have the code write to do the calculation but im stuck on how to get it to display the total in the textbox once ive hit the calculate button, ive tried several ways, the page posts back, i get no errors but nothing in textbox1 toocan you take a look and help me out please. Thanks and Kind Regards &...

Opinions on Viewstate vs. Session variable for state management on dataset
I came across many sample codes that using ViewState(myDataSet) and Session("myDataSet"). Which is a better way to use to keep the session around. What are the pros and cons? Anybody can share with your experience or thoughts? Thanks, teresa Take a loot at this article: State Management in Web Forms http://www.c-sharpcorner.com/Code/2004/Feb/StateManagementInWebForms.aspDarrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you!...

Bug and Setting textbox to readonly using Visual Studion.Net
I have came across a problem in visual studio.net, when I set any textbox to read only the value that I assign to the textbox get lost upon repost, does any one know what would cause this or is this a bug in Asp.net or visual studio.net?? where are you making it readonly in the aspx itself or in the page load of code behind?Regards,Krishna Kishore.  View My Blog Hi, can you show the sample code you have? You are setting the value specifically with javascript (since its readonly) and then submitting? If the control is read-only, the new posted value is ignored on the...

get html textbox value in C#.net(code behind)
  i am new to ASP.net. Can anybody say how to get Input textbox value in C#.net. b4 sending answer Thankx  string value = Resquest.Form["textboxname"].ToString(); Hi,There are two ways to access it. 1) Make it runat="server" and access it in code behind like textbox1.value2) Another way is by using     Request.Form["textbox1"].ToString(); I hope this will be helpful to you.Thanks, Alpesh DhaneshaPlease don't forget to "Mask as Answer" if it helped. just add runat =server to html  ...

Web resources about - Viewstate not getting reapplied unless textbox is readonly - asp.net.state-management

Viewing ASP.NET viewstate with ViewState Decoder - testingReflections.com
Tamper-Proofing A hashcode will not secure the actual data within the ViewState field, but it will greatly reduce the likelihood of someone ...

Binary-to-text encoding - Wikipedia, the free encyclopedia
The ASCII text-encoding standard uses 128 unique values (0–127) to represent the alphabetic, numeric, and punctuation characters commonly used ...

Support • FileSeek • Binary Fortress Software
FileSeek: Lightning Fast File Search!

Funny contents index page
A2Zmenu.Com Blog Tutorials Online Exam Ask Question Utility Fun @ Work Funda Contact Us About Us Loading Topic All Category Appraisal FunnyImages ...

Languages -> C# Articles, Tutorials, Examples: ASP Alliance
.NET,ASP,ASP.NET,SQL,XML,HTML,ADO,ADO.NET,JavaScript,JScript,CSharp,VBScript and VB tutorials from AspAlliance.

Blog Archive
Blog Archive 2013 75 Essential Tools for iOS Developers Aug 15 2013 posted in iOS Speaking at Cocoa Conf PDX Jul 13 2013 posted in Speaking In ...

iTunes Sync Tested MP3 Players - Binary Fortress Software
Home • Support Binary Fortress Software The people that give you all of these great applications, and more! DisplayFusion Multi-monitor taskbar, ...

LAMP & Microsoft Stacks - SMX Sydney - David Cropley
... is a great place to start with people using IIS, it will allow you to get a better understanding of your site from an SEO perspective Use viewstates ...

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013

The Antidote to ASP.NET Smart Navigation
One of the issues I have with ASP.NET is that it is postback crazy . Virtually nothing of significance can be done in pure browser client code ...

Resources last updated: 11/29/2015 3:58:43 PM