Confirm form control type

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jason

    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?


  • Ray at

    #2
    Re: Confirm form control type

    No, I do not believe so.

    Ray at work

    "jason" <jason@catamara nco.com> wrote in message
    news:%23asw69DY DHA.2448@TK2MSF TNGP09.phx.gbl. ..[color=blue]
    > 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?
    >
    >[/color]


    Comment

    • Bob Barrows

      #3
      Re: Confirm form control type

      jason wrote:[color=blue]
      > 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?[/color]
      Not without some kind of naming convention. I usually use a"txt" preface on
      my textbox names, etc.
      Bob Barrows


      Comment

      • jason

        #4
        Re: Confirm form control type

        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" <aaron@TRASHasp faq.com> wrote in message
        news:ORidCGEYDH A.536@TK2MSFTNG P10.phx.gbl...[color=blue]
        > 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[/color]
        let[color=blue]
        > you determine the type; they are just a collection of name/value pairs.
        >
        >
        >
        >
        > "jason" <jason@catamara nco.com> wrote in message
        > news:#asw69DYDH A.2448@TK2MSFTN GP09.phx.gbl...[color=green]
        > > Is there a way to determine the form control type in asp...in other[/color][/color]
        words,[color=blue][color=green]
        > > to confirm that a control is a eg checkbox when looping the form[/color][/color]
        controls?[color=blue][color=green]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • jason

          #5
          Re: Confirm form control type

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

          "Bob Barrows" <reb_01501@yaho o.com> wrote in message
          news:egf$OHEYDH A.2572@TK2MSFTN GP09.phx.gbl...[color=blue]
          > jason wrote:[color=green]
          > > 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?[/color]
          > Not without some kind of naming convention. I usually use a"txt" preface[/color]
          on[color=blue]
          > my textbox names, etc.
          > Bob Barrows
          >
          >[/color]


          Comment

          • Ray at

            #6
            Re: Confirm form control type

            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" <jason@catamara nco.com> wrote in message
            news:OLvMVaEYDH A.1580@tk2msftn gp13.phx.gbl...[color=blue]
            > Got it - I'll do it this way - Aaron also suggested this. I am guessing
            > that .NET would probably overcome this limitation...
            >
            > "Bob Barrows" <reb_01501@yaho o.com> wrote in message
            > news:egf$OHEYDH A.2572@TK2MSFTN GP09.phx.gbl...[color=green]
            > > jason wrote:[color=darkred]
            > > > 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?[/color]
            > > Not without some kind of naming convention. I usually use a"txt" preface[/color]
            > on[color=green]
            > > my textbox names, etc.
            > > Bob Barrows
            > >
            > >[/color]
            >
            >[/color]


            Comment

            Working...