Why a hidden variable is present on Page but Request.Form[controlID] is NULL, when Posted back in some scenarios.

Hi All, I have following scenario of my asp.net application:1.       Opened an customer info view(readonly controls)  page in the  browser window2.       Ctrl N to call the same view page in another window3.       I have a html hidden variable/control to keep track some data on page and default to “” For ex: <input type="hidden" id="ThresholdControlArray" name="ThresholdControlArray" value="" />4.       I entred in edit mode ( just all controls are readable) – edited and saved , which would lead to customer list page. 5.       In another browser window, I try to close ( which is a asp.net button does a postback, on server side click, response redirected to List page)subj: when I check the viewsource hidden control , hidden control exist with above default value, but when posted by clicking “Close” button, in the page_load event,                Request.Form[“ThresholdControlArray”] is coming NULL, why?  Why is not posted back to server, should all controls available by default in Postback mode? This issue is only arised when I take duplicate browser window situation, otherwise works perfect fine…  I have another configuration entry, to avoid viewstate failed error … just for info, does it influence any?<pages viewStateEncryptionMode="Never" enableEventValidation="false" validateRequest="false" maxPageStateFieldLength="1000">                  <controls><add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>                  </controls>            </pages> Any insights are highly appreciated.Crying 

 

0
phani
11/30/2007 2:21:44 AM
asp.net.web-forms 93655 articles. 6 followers. Follow

1 Replies
583 Views

Similar Articles

[PageSpeed] 27
Get it on Google Play
Get it on Apple App Store

If you examine Request.Form.ToString() is there an entry for your hidden field.

I notice ur hidden field is defined with no value... which might indicate why u get null when u try to retrieve it's value.

How are u opening "window3"? You hit CTRL+N then? do u type in the url or is the page loaded automatically... I can't remember the behaviour of some browsers, what browser are you using?

If you hit CTRL+N and the same page is opened (automatically) it's probably being opened from the cache, and if that's true it's probably the same page without any of the state changes triggered by post backs that may or may not have occurred. But I'm just guessing.


-- Sam Critchley

"Wise man say 'forgiveness is divine, but never pay full price for late pizza." - TMNT

shivam.com.au
0
worldspawn
11/30/2007 8:56:01 AM
Reply:

Similar Artilces:

Can my web page with a form submit to other web pages forms?
I was wondering if I created an aspx page that had a form on it that I could use the submit button to submit this form's contents to other web pages forms(servers accepting those form's data). I am thinking this would be a great way to update data on particular web pages without having to actually visit those similar web pages. Any ideas, examples would be much appreciated. Thanks in advance.  Yes you can.  It's called Cross Page Posting: http://msdn2.microsoft.com/en-us/library/ms178139.aspxAlso: http://msdn2.microsoft.com/en-us/library/ms178140.aspx might ...

Could PB .NET Web Form POST security Information to others web page??
This is a multi-part message in MIME format. ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Hi,=20 Have anyone came across the requesion to POST security informations from = PB .NET web form web page to other web site?? I have tried many datys, Could any kind man give me some suggessions?? thanks & Best regards Leon ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/html; charset="big5" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML P...

How to preserve values in a web form when navigating to a different page and then going back to the original page using the back button ?
   I am working on a C#/ASP.NET web application. The web application basically consist of 3 web forms. Each form contains several controls such as an edit box, and some drop down list box controls. Basically I need to find out how to preserve the values in a web form when a person navigates to a different page. For example, suppose that in my web application I navigate from my first page (First.aspx) to my second page (Second.aspx). Now if I press the browsers back button, I want the application to retain the values for the controls that were in my first web form "first....

Open web page in IE and populate fields on the form from my web form
To the dot net Knights.  Many humble thanks in advance from a dot net surf. We have an vb application that opens multiple instances of IE object, each to different web pages.  It then takes information from the current record in the app, populates fields on each of the web pages, and them submits the forms.  We are then able to look at the resulting web pages and quickly get the info we're looking for.This prevents us from having to manually navigate to each web site, enter the same information and then wait for the page to open.  If there is ...

Implementing .Net Form into an APS.net web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an ASP.net web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

Web Part, Web Request, and HTML form Variables
I would like to build a web portal to display existing standalone web sites in separate web parts.  I was thinking I would need to use an IFRAME in a web part or have the web part do a web request and display the web response.  I would like to be able to monitor the http traffic between the web part and the existing web sites server so that I can perform additional processing on my server. Is there a way that I can capture (read only) the form variables/ hyperlink address when a user clicks a form submit button or hyper link in a web part that has an IFRAME? What if I used the w...

windows forms in vb .net into web forms
we are creating a database driven website as part of our project. currently we have forms connecting to the database created in visual basic. these windows forms we need to convert into web forms which are asp .net compatible. can u give me an answer or show me a way. Hi, because of the difference in nature between web and win applications you'll need to reimplement at least the UI part. If you have a multitiered application in which the busines logic and data access are in different parts/assemblies you can reuse them. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Wor...

Posting to Web Form with DropDownList from another form
I have a page with a drop down list that displays data on post back from the drop down list selected index change event. (call this form1) I need the ability to post to this page from another form (call this form2). there are about 6 options in form1. form2 will contain only 2 of these options displayed as simple hyperlinks. when the user clicks these links from form2 it needs to simply force a post back with that value from form2. id like to do this without javascript and id like to use the drop down list server control. anyone have a quick simple way to accomplish this? than...

Keeping the web form on top of all other forms/pages
Hi all,         I need to know how to keep my web page always on top...atleast let me know weather its possible...I dont want to  give focus to page when focus is lost. I dont want to intrupt any other application on the machine ( as focus does )...but yet let it float on the top ( even in disabled mode if possible)I kind of want to do something like setting the z-order to 1... Is there any api 'focus' uses to achieve this ( bring the page frount ).? Thanks in advance,Suman No, thankfully you can't do this from a web page - imagin...

request.form & variable form name
I have a page which contains a form which will have a variable number of textboxes for the user to complete. The text boxes are called (for arguements sake) Textbox1, Textbox2, Textbox3 etc I was intending to create a Do.... Loop using a counter and variable to create the textbox name and then use this variable in the request.form command  -  see below as an example of what I am trying to say.             Dim loopcount As Integer = 1            Dim item_IDs As Str...

Web forms and mobile web forms
Hey everyone, I am looking to develope a web site that depending on the device connecting to it, it will display a certain page. In this case im looking to create a web and wap version of the same project. I have the Web forms version finished using ASP.NET and C# and I am wondering how to create the mobile web form and incorporate it in the project. In the project folder, can I just add a mobile web??? But what about displaying device specific pages?? Cheers -Dudach Yes, you can add mobile web forms and controls to your Web Application project. No problem. For device/br...

How to Make Web Forms from other Web Forms
In putting together an ASP.NET application for a biz application, we have come to the point where there are three different types of basic forms which have, for the most part, been perfected. Now its is a matter of cloning those forms for various uses and modifying or adding code to suit the particular need. Copy and paste works OK, but there is a lot of changing of certain words, etc. Is there a way in ASP.NET to take these basic forms, turn them into classes or templates, create forms from them, then add or overwrite code? ? (Anybody who is a Vis Fox Pro programmer would know imme...

Request.Form or Request.Form.Get
Moderator - will you please post this question in the 'Getting Started' forum? I've been provided with JavaScript that dynamically dynamically creates a text box using an HTML input tag (no runat attribute exists) .  Can somebody please tell me how to access the data entered into this input box from the code-behind without first adding a runat attribute to the input tag (I don't want to modify the JS that creates this input box)? If the answer requires using Request.Form and Request.Form.Get, I tried testing with those functions in my btnSave event handler, and they always seem...

Web Post... Request.form
Hi guys, I am working on a windows service which has to simulate as if the data posted is coming from a webpage. The remote page is a classic ASP page, which is reading the data as request.form.. Any suggestions ?? I am currently using httpwebrequest.. which seems to be not doing what I want to achieve. Thanks heaps..Sunny NAGIProper Preparation Prevents Poor PerformanceDont forget to click "Mark as Answer" on the post that helped you. Hi everyone, Never mind.. I solved my problem it was due to SSL Cheers!Sunny NAGIProper Preparation Prevents Poor Perform...

Web resources about - Why a hidden variable is present on Page but Request.Form[controlID] is NULL, when Posted back in some scenarios. - asp.net.web-forms

Resources last updated: 12/17/2015 9:05:07 AM