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

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 2395
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*******@infoconcepts.com

"neverstill" <sk************@yahoo.com> wrote in message
news:%2****************@tk2msftngp13.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="myHiddenField" />

The type of your control is HtmlInputHidden

"neverstill" <sk************@yahoo.com> wrote in message
news:%2****************@tk2msftngp13.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****************@tk2msftngp13.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
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....
1
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...
2
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...
3
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...
4
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...
7
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...
1
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...
1
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...
3
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....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...

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.