Solved

asp.net - vb.net Passing a value from a hidden text field

Posted on 2004-09-09
3
271 Views
Last Modified: 2012-05-05
Ok, I feel really dumb asking this question.  I spent a good deal of time today trying to figure out why I couldn't pass a value to my hidden text field value.  It was as if the hidden text field didn't exist: I had it in the page as a protected withevent, I had runat server.  Then when I try to just hard code a value in the hidden field and request it from my next page it had nothing in it.

Help
0
Comment
Question by:oshe127
3 Comments
 

Expert Comment

by:shahzaibkhan
ID: 12029388
the question is little confusing. YOU have hidden field which you want to access in your code behinde but you could not, is that so? IN which event you are trying?
0
 
LVL 44

Accepted Solution

by:
Arthur_Wood earned 50 total points
ID: 12031408
hidden text fields, in the ASP sense, are NOT seen when the page is posted to ASP.NET.  You must add an ASP.NET text field, and then make its Visible Property FALSE.  That will add the runat=server attribute, so that the text field will be accessible from the code-behind of the asp.net page.  ASP.NET cannot see any of the standard ASP controls, which are only rendered on the clinet, and not passed back to the server to be 'seen' by the code-behind.

AW
0
 

Author Comment

by:oshe127
ID: 12061025
Thank you!
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
isEverywhere  challenge 19 77
method argument as final 1 93
WPF - External data binding to controls inside a UserControl 2 63
groupSum5 challenge 5 85
There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question