473,397 Members | 1,969 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,397 software developers and data experts.

Hidden values

Hi,

Is it possible to pass the value of a hidden field in the querystring?
If not, how can you pass the value from page to page without using
server controls?

Thanks,
Roshawn
Nov 19 '05 #1
2 861
You can use Session Variables

Nov 19 '05 #2
Hi Roshawn,

Here's a way to pass values from one page to another without the messy
querystring.

You can pass Context and then use Server.Transfer. The code below shows the
starting page first and then the receiver page.

Let us know if this helps?

Ken
Microsoft MVP [ASP.NET]
' Page with hidden textbox:

<form id="Form1" method="post" runat="server">
<p>
<asp:textbox id="TextBox1" runat="server"
visible="False">Pass this!</asp:textbox></p>
<p>
<asp:button id="Button1" runat="server"
Text="Button"></asp:button></p>
</form>

Private Sub Button1_Click _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Context.Items("txtValue") = TextBox1.Text
Server.Transfer("targetpg.aspx")
End Sub
' targetpg.aspx that shows the passed value

<form id="Form1" method="post" runat="server">
<asp:label id="Label1" runat="server">Label</asp:label>
</form>

Private Sub Page_Load _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Label1.Text = CType(Context.Items("txtValue"), String)
End Sub

"Roshawn Dawson" <ud****@bellsouth.net> wrote in message
news:OW**************@TK2MSFTNGP09.phx.gbl...
Hi,

Is it possible to pass the value of a hidden field in the querystring? If
not, how can you pass the value from page to page without using server
controls?

Thanks,
Roshawn


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Randell D. | last post by:
Folks, Perhaps someone can figure this out - this is 'the process of my script' I have a form whereby I can add multiple contacts to a single address. There is only one...
3
by: Itai | last post by:
I have an aspx file named index.aspx which contains two ‘form' sections, one that has the runat=server attribute (e.g From1) and one which is a regular HTML form (e.g SignInForm). I am trying...
9
by: Randell D. | last post by:
Folks, I have a large amount of values to store (we're talking tens, if not hundreds of bytes). I need this for a client side application - ignore the security consequences for the moment -...
1
by: Omar | last post by:
Hi, In my JSP file I have: <input type="hidden" name="campo" value="<%= campo %>"><br> <input type="hidden" name="valor" value="<%= valor %>"><br> <input type="hidden" name="anterior"...
1
by: abcd | last post by:
I have an ASP page which has 2 list boxes. When the selection changes from L1 it runs another asp page in hidden frame (hidden1), that page will do some database fetch and will set some control...
3
by: Rajesh | last post by:
Hello all, I have a problem here. I have a procedure called FillForm() where I populate values for some hidden asp:textboxes. But after I do a postback, my values in the textboxes are lost and I...
3
by: Jeremy Ames | last post by:
I have a form that contains two hidden values, among other controls. I was wondering, if I change these values in server script and immediately do a server.transfer, do these values get updated...
2
by: UJ | last post by:
I have an aspx page that does some database look ups on the initial load. I then need to do stuff later after an autopostback based on some of the values. So I put some variables in input variables...
3
by: simora | last post by:
Hi: Need some working sample code to post hidden form data from a php page to a new popup window. 540 x 500 centered. The popup that I'm calling already is formatted and has a TITLE:web-2007.php...
5
by: Geethu03 | last post by:
Hi i have a array values in hidden format <form name="form2" method="post" action="test.php"> <input type="hidden" name="date_val" value="<%= date %>"> <input type="hidden" name="name_val"...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.