server side control and undefined value

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

    #1

    server side control and undefined value

    Hi,
    I noticed this behaviour more often.
    in the visual c# editor of .NET 1.1 if select a HTML control and then select
    it in the form editor and then right click and select run as server control,
    thhus changing it to a server side control, sometimes these controls don't
    get initialised in the code behind.
    For instance, now I have a radio group of 5 radio button, and I selected
    them an made them run at server. If i put a breakpoint in my code behind in
    the page_load on these lines of code
    if(Request["rdoAbonnem ent"]!=null){
    if(Request.Form["rdoAbonnem ent"].Equals(Radio1. Value)){do something}
    if(Request.Form["rdoAbonnem ent"].Equals(Radio2. Value)){do something}
    if(Request.Form["rdoAbonnem ent"].Equals(Radio3. Value)){do something}
    if(Request.Form["rdoAbonnem ent"].Equals(Radio4. Value)){do something}
    if(Request.Form["rdoAbonnem ent"].Equals(Radio5. Value)){do something}
    }
    However Radio3 is a null reference, this control reference doesn;'t get
    initialises. I saw this behaviour more often and with different types of
    controls.
    Anybody got an idea?
    Greetz Boris


  • Pent

    #2
    Re: server side control and undefined value

    This is VC++ groups. check ...csharp, aspnet

    "Boris Nieuwenhuis" <borisnieuwenhu is@hotmail.com> wrote in message
    news:easPCuFpDH A.2268@TK2MSFTN GP12.phx.gbl...[color=blue]
    > Hi,
    > I noticed this behaviour more often.
    > in the visual c# editor of .NET 1.1 if select a HTML control and then[/color]
    select[color=blue]
    > it in the form editor and then right click and select run as server[/color]
    control,[color=blue]
    > thhus changing it to a server side control, sometimes these controls don't
    > get initialised in the code behind.
    > For instance, now I have a radio group of 5 radio button, and I selected
    > them an made them run at server. If i put a breakpoint in my code behind[/color]
    in[color=blue]
    > the page_load on these lines of code
    > if(Request["rdoAbonnem ent"]!=null){
    > if(Request.Form["rdoAbonnem ent"].Equals(Radio1. Value)){do something}
    > if(Request.Form["rdoAbonnem ent"].Equals(Radio2. Value)){do something}
    > if(Request.Form["rdoAbonnem ent"].Equals(Radio3. Value)){do something}
    > if(Request.Form["rdoAbonnem ent"].Equals(Radio4. Value)){do something}
    > if(Request.Form["rdoAbonnem ent"].Equals(Radio5. Value)){do something}
    > }
    > However Radio3 is a null reference, this control reference doesn;'t get
    > initialises. I saw this behaviour more often and with different types of
    > controls.
    > Anybody got an idea?
    > Greetz Boris
    >
    >[/color]


    Comment

    • Boris Nieuwenhuis

      #3
      Re: server side control and undefined value

      Sorry

      "Pent" <pent> wrote in message news:eqpaZ4HpDH A.1676@TK2MSFTN GP09.phx.gbl...[color=blue]
      > This is VC++ groups. check ...csharp, aspnet
      >
      > "Boris Nieuwenhuis" <borisnieuwenhu is@hotmail.com> wrote in message
      > news:easPCuFpDH A.2268@TK2MSFTN GP12.phx.gbl...[color=green]
      > > Hi,
      > > I noticed this behaviour more often.
      > > in the visual c# editor of .NET 1.1 if select a HTML control and then[/color]
      > select[color=green]
      > > it in the form editor and then right click and select run as server[/color]
      > control,[color=green]
      > > thhus changing it to a server side control, sometimes these controls[/color][/color]
      don't[color=blue][color=green]
      > > get initialised in the code behind.
      > > For instance, now I have a radio group of 5 radio button, and I selected
      > > them an made them run at server. If i put a breakpoint in my code behind[/color]
      > in[color=green]
      > > the page_load on these lines of code
      > > if(Request["rdoAbonnem ent"]!=null){
      > > if(Request.Form["rdoAbonnem ent"].Equals(Radio1. Value)){do something}
      > > if(Request.Form["rdoAbonnem ent"].Equals(Radio2. Value)){do something}
      > > if(Request.Form["rdoAbonnem ent"].Equals(Radio3. Value)){do something}
      > > if(Request.Form["rdoAbonnem ent"].Equals(Radio4. Value)){do something}
      > > if(Request.Form["rdoAbonnem ent"].Equals(Radio5. Value)){do something}
      > > }
      > > However Radio3 is a null reference, this control reference doesn;'t get
      > > initialises. I saw this behaviour more often and with different types of
      > > controls.
      > > Anybody got an idea?
      > > Greetz Boris
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...