473,396 Members | 2,036 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,396 software developers and data experts.

Confirm form control type

Is there a way to determine the form control type in asp...in other words,
to confirm that a control is a eg checkbox when looping the form controls?
Jul 19 '05 #1
5 2128
No, I do not believe so.

Ray at work

"jason" <ja***@catamaranco.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Is there a way to determine the form control type in asp...in other words,
to confirm that a control is a eg checkbox when looping the form controls?

Jul 19 '05 #2
jason wrote:
Is there a way to determine the form control type in asp...in other
words, to confirm that a control is a eg checkbox when looping the
form controls?

Not without some kind of naming convention. I usually use a"txt" preface on
my textbox names, etc.
Bob Barrows
Jul 19 '05 #3
Thats a good idea - prefacing the name with the control type - will do it
this way. I suspect that .NET will take care of this shortfall...
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:OR*************@TK2MSFTNGP10.phx.gbl...
Only if you name them as such, e.g.

<input type=text name=txtFoo>
<input type=checkbox name=chkBar>

Then you can check the name of the element...

There is nothing inherent in the form / querystring collection that will let you determine the type; they are just a collection of name/value pairs.


"jason" <ja***@catamaranco.com> wrote in message
news:#a**************@TK2MSFTNGP09.phx.gbl...
Is there a way to determine the form control type in asp...in other words, to confirm that a control is a eg checkbox when looping the form controls?


Jul 19 '05 #4
Got it - I'll do it this way - Aaron also suggested this. I am guessing
that .NET would probably overcome this limitation...

"Bob Barrows" <re*******@yahoo.com> wrote in message
news:eg**************@TK2MSFTNGP09.phx.gbl...
jason wrote:
Is there a way to determine the form control type in asp...in other
words, to confirm that a control is a eg checkbox when looping the
form controls? Not without some kind of naming convention. I usually use a"txt" preface

on my textbox names, etc.
Bob Barrows

Jul 19 '05 #5
It doesn't matter if you're using .net or not. The browser will still post
the same data. That's not to say that it won't trick developers into
thinking it's handling it though. :]

Ray at work

"jason" <ja***@catamaranco.com> wrote in message
news:OL**************@tk2msftngp13.phx.gbl...
Got it - I'll do it this way - Aaron also suggested this. I am guessing
that .NET would probably overcome this limitation...

"Bob Barrows" <re*******@yahoo.com> wrote in message
news:eg**************@TK2MSFTNGP09.phx.gbl...
jason wrote:
Is there a way to determine the form control type in asp...in other
words, to confirm that a control is a eg checkbox when looping the
form controls?

Not without some kind of naming convention. I usually use a"txt" preface

on
my textbox names, etc.
Bob Barrows


Jul 19 '05 #6

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

Similar topics

2
by: neoconwannabe | last post by:
Hi, I have an html form with a number of checkboxes that can be checked to delete items. I want to have a javascript alert prompt box to pop up to confirm the delete. I am building my site with...
13
by: LRW | last post by:
Having a problem getting a onSubmit function to work, to where it popsup a confirmation depending on which radiobutton is selected. Here's what I have: function checkdel() { if...
4
by: JohnSouth104 | last post by:
Hi I want to warn the user that changing the selected item in a pull-down will clear some data he has already entered in a file download box. I've tried using confirm() to return true or false...
3
by: Doug O'Leary | last post by:
Hey, all; Apparently, I'm missing the concept. I'm writing a web app in perl to manage nagios configuration files. One of the things I'd like to do is to confirm an update via a popup window...
4
by: @sh | last post by:
Can anyone help out here please, we have a button that when pressed will alert the user, should they cancel no action is taken, however should they confirm, the script will disable the button and...
0
by: Chris Fink | last post by:
My goal is to have an ASP.NET checkbox server tag with it's autopostback set to true, that when clicked will run the checkbox's CheckedChanged event. However, I would like to try to add a...
13
by: Chris | last post by:
I can create Javascript confirm message boxes during page creation, etc adding them to the button attributes (many good posts on this!). But how can I add this event after the button is pressed? I...
8
by: rn5a | last post by:
I have gone through a no. of posts in this NewsGroup regarding my problem but alas, couldn't come across one which would have helped me in resolving the issue. My problem is this: An ASPX Form...
3
by: ghjk | last post by:
I have a web page which is used to enter user data. In there I have 4 buttons named as "Submit, Confirm,Edit,Cancel". User should enter data and click "Submit " button. Then I want to display all...
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: 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
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: 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
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.