473,789 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

server control that will render <input type="hidden"`

hi-

I need to have an asp:TextBox that will allow me to set the type attribute
to hidden. I can't seem to find a way to do this. Basically, I have a
Wizard application that will show/hide different panels for each step. I
need to track what step I'm on, so I though I would just add a simple little
hidden input and increment it each time. Not so easy.

the Visible property of the basic asp:TextBox sets whether or not the
control is rendered. I don't want that. I just want type="hidden"

Am I going to need to make my own server control?

Any tips? I feel that I MUST be missing something....

Thanks,
Steve
Nov 18 '05 #1
3 2411
Try using a label instead of a textbox. If you set the label's Visible
status to False, it'll act just like a hidden form field, with the added
benefit that your users won't see it if they look in the source code. Then
you can call that field with the label's Text property, change it, use it
wherever needed.

Hope that helps.

--
------------------------------------------------------------
Kenneth S. McAndrew
Software Developer, Information Concepts
km*******@infoc oncepts.com

"neverstill " <sk************ @yahoo.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
hi-

I need to have an asp:TextBox that will allow me to set the type attribute
to hidden. I can't seem to find a way to do this. Basically, I have a
Wizard application that will show/hide different panels for each step. I
need to track what step I'm on, so I though I would just add a simple little hidden input and increment it each time. Not so easy.

the Visible property of the basic asp:TextBox sets whether or not the
control is rendered. I don't want that. I just want type="hidden"

Am I going to need to make my own server control?

Any tips? I feel that I MUST be missing something....

Thanks,
Steve

Nov 18 '05 #2
just add the runat="server" to a normal hidden field

<input type="hidden" runat="server" id="myHiddenFie ld" />

The type of your control is HtmlInputHidden

"neverstill " <sk************ @yahoo.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
hi-

I need to have an asp:TextBox that will allow me to set the type attribute
to hidden. I can't seem to find a way to do this. Basically, I have a
Wizard application that will show/hide different panels for each step. I
need to track what step I'm on, so I though I would just add a simple little hidden input and increment it each time. Not so easy.

the Visible property of the basic asp:TextBox sets whether or not the
control is rendered. I don't want that. I just want type="hidden"

Am I going to need to make my own server control?

Any tips? I feel that I MUST be missing something....

Thanks,
Steve

Nov 18 '05 #3
thanks guys, rad solutions the both of them. i like the label one cause
it's clean.

Anyway, thanks again!

"neverstill " <sk************ @yahoo.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
hi-

I need to have an asp:TextBox that will allow me to set the type attribute
to hidden. I can't seem to find a way to do this. Basically, I have a
Wizard application that will show/hide different panels for each step. I
need to track what step I'm on, so I though I would just add a simple little hidden input and increment it each time. Not so easy.

the Visible property of the basic asp:TextBox sets whether or not the
control is rendered. I don't want that. I just want type="hidden"

Am I going to need to make my own server control?

Any tips? I feel that I MUST be missing something....

Thanks,
Steve

Nov 18 '05 #4

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

Similar topics

6
4486
by: Saqib Ali | last post by:
I have created a slider using Javascript and html tables that generally works very well. As you move the "knob" to the right, a numeric value in an adjactent <INPUT type="text"> tag increases. As you move the knob to the left, the numeric value decreases... just as it should. It works very smooth and seamlessly. Very responsive to the mouse's movement. Now, I would like to make this INPUT tag have type="hidden". But when
1
27907
by: Jesper Hermansen | last post by:
Hi! I'm making a system that will generate Winamp-playlists. To make it easy for the user to add a file to the list, I'm using <input type="file">. The problem with this is that I only get the filename, not the path, which is necessary in my situation. I cracked the problem in Firefox:
2
28576
by: Matt | last post by:
If I do the following, the browse text box still cannot see C:/hello world/test.txt. <input type="file" name="fileName" value="C:/hello world/test.txt" size=80> Any ideas? and workarounds to this problem? thanks!!
3
1828
by: Mike Labosh | last post by:
I'm a middle tier (dll / MTS / COM+ / Extensions) guy and I'm a bit rusty on the GUI part of ASP.NET I have a web form that a user uses to cycle through records in the DB to review unmatched items and assign / fix them. I need the WebForm to contain the identity key from the SQL Server table so the Save button can pass it in a WHERE clause so that the system updates the correct record, but I don't want the user to SEE this value on the...
4
7861
by: Petr Vileta | last post by:
Sorry if my question was be here earlier, I'm new here ;-) I have html form where is the tag <input id="x" type="file" name="upload"> and another fields. After submit script on server take some validation on some fields and if te error is found the same form is generated with error reporting message. But the content of the "file" input is lost. I test it in IE6 and parameter value="???" not work here. I try to put string into input...
7
20871
by: Tim Slattery | last post by:
I'm trying to handle the onChange event in an <input type="file"> element. In IE, there's no problem: the event fires when a file in the "open" box is doubleclicked, or the "Open" button in the box is clicked, or "Enter" is hit in the attached text box. I can get the value of the element. But in Netscape 7, onChange doesn't fire until focus leaves the element. When you double-click a file name or click "open" in the Open box, the...
1
7084
by: mark | last post by:
Forgive me if this seems like a stupid question but I need help... I'm trying to do a simple online form that emails me the results from a few fields. Here is the code: <form action="http://cm1web1/WebSurveyComponents/script/ processform.asp" method="post">
1
6457
by: msg2ajay | last post by:
hi, i am working on <div> i have to hide some part of the table. I am not able to hide that table part can anybady tell me where is the error. <html> <head> <script type="text/javascript"> function callme(){ document.getElementById("hid").style.visibility="visible"; }
3
3508
by: dba | last post by:
Without giving a lot of script at this time, I am having a problem with php and form input type="hidden". Problem is that the hidden variable displays last line from database query. Some code. if ($field_name=="member_lname") { echo "<input type='radio' name='selection' value=' " . $result. ',' .$result ." ' " . $result . ', ' . $result . "<br />"; echo "<input type='hidden' name='member_id' value=" .
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10408
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10139
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9020
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3700
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.