Riddle me this... RBL strikes again. Min USENET clue reveals noth

Discussion in 'ASP .Net Web Controls' started by Michael Conroy, Feb 10, 2005.

  1. Slap a radiobuttonlist on the screen with a textbox and a button. Change the
    order of the RBL and textbox and suddenly viewstate and event handling goes
    away. Swap 'em back and all is well. This ready to run code snippet
    demonstrates the behavior.

    Does ANYBODY have any idea why this is...and more importantly, what I can do
    about it? Is this a bug, my own lack of sleep, or a "forest for the trees"
    problem.

    Cheers,
    M.

    <%@ Page Language="C#" EnableSessionState="True" Trace="True" %>
    <HTML>
    <HEAD>
    <script runat="Server" language="C#">
    protected void Page_Load(object sender, System.EventArgs e)
    {
    this.m_rbList.SelectedIndexChanged += new
    System.EventHandler(this.m_rbList_SelectedIndexChanged);

    if(!this.IsPostBack)
    {
    for(int i=0;i<5;i++)
    {
    m_rbList.Items.Add("Choice " + i.ToString());
    }
    }
    }

    private void m_rbList_SelectedIndexChanged(object sender,
    System.EventArgs e)
    {
    if(m_rbList.SelectedIndex>-1)
    this.m_btnNext.Enabled=true;
    else
    this.m_btnNext.Enabled=false;
    }

    </script>
    </HEAD>
    <body style="FONT: 10pt verdana">
    <form runat="Server" id="Form1">
    <!-- THIS WORKS
    <asp:RadioButtonList id="Xm_rbList" runat="server"
    AutoPostBack="True"></asp:RadioButtonList>
    <asp:Textbox value="TextBox/RadioButton Mystery"
    id="XtxtName" runat="Server" ></asp:Textbox> -->

    <!-- THIS DOESN'T!!!!!
    <asp:Textbox value="TextBox/RadioButton Mystery"
    id="ytxtName" runat="Server" ></asp:Textbox>
    <asp:RadioButtonList id="ym_rbList" runat="server"
    AutoPostBack="True"></asp:RadioButtonList> -->

    <asp:Button id="m_btnNext" runat="server" Text="Next"
    Enabled="False"></asp:Button></P>
    <asp:RadioButtonList id="m_rbList" runat="server"
    AutoPostBack="True"></asp:RadioButtonList>
    <asp:Textbox value="TextBox/RadioButton Mystery"
    id="txtName" runat="Server" ></asp:Textbox>

    </FORM>
    </body>
    </HTML>
    Michael Conroy, Feb 10, 2005
    #1
    1. Advertising

  2. OK... so replicating this with a blank .Net webApp yields perfectly
    acceptable behavior... so, I should amend that this occurs when using the MS
    Web Browser control inside an app hosting the ASP.NET runtime.

    Any takers now? :)
    Michael Conroy, Feb 10, 2005
    #2
    1. Advertising

  3. > Any takers now? :)
    sure. i'm always a sucker for that kinda thing.

    I copied and pasted your code. Ran it. It behaved correctly, that is, i
    don't see the error you are talking about


    --
    Regards,
    Alvin Bruney [MVP ASP.NET]

    [Shameless Author plug]
    The Microsoft Office Web Components Black Book with .NET
    Now Available @ http://www.lulu.com/owc
    ----------------------------------------------------------


    "Michael Conroy" <> wrote in message
    news:...
    > OK... so replicating this with a blank .Net webApp yields perfectly
    > acceptable behavior... so, I should amend that this occurs when using the
    > MS
    > Web Browser control inside an app hosting the ASP.NET runtime.
    >
    > Any takers now? :)
    >
    >
    Alvin Bruney [MVP], Feb 11, 2005
    #3
  4. Re: Riddle me this... RBL strikes again. Min USENET clue reveals

    Of course... :(

    I did the same thing with a simple WebApplication1 project. Works fine.
    What I'm seeing is the result of hosting the ASP.NET runtime ala Rick
    Strahl's article...

    http://www.west-wind.com/presentations/aspnetruntime/aspnetruntime.asp

    Great article - and he's been very helpful. I was able to replicate the
    problem using his sample code... so I suspect the issue lies somewhere in his
    implementation. All the source is there, but I don't know that much about
    browser mechanics, so I'm not really sure how to go about debugging things.
    I've tracked through the post buffer and it really looks fine, so maybe it's
    an idiosyncracy with the Microsoft Web Browser control? I just don't know...

    Thanks for responding... and if you have any other suggestions for making a
    pretty HTML style UI, feel free... :)

    Best,
    M.


    "Alvin Bruney [MVP]" wrote:

    > > Any takers now? :)

    > sure. i'm always a sucker for that kinda thing.
    >
    > I copied and pasted your code. Ran it. It behaved correctly, that is, i
    > don't see the error you are talking about
    >
    >
    > --
    > Regards,
    > Alvin Bruney [MVP ASP.NET]
    >
    > [Shameless Author plug]
    > The Microsoft Office Web Components Black Book with .NET
    > Now Available @ http://www.lulu.com/owc
    > ----------------------------------------------------------
    >
    >
    > "Michael Conroy" <> wrote in message
    > news:...
    > > OK... so replicating this with a blank .Net webApp yields perfectly
    > > acceptable behavior... so, I should amend that this occurs when using the
    > > MS
    > > Web Browser control inside an app hosting the ASP.NET runtime.
    > >
    > > Any takers now? :)
    > >
    > >

    >
    >
    >
    Michael Conroy, Feb 11, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. neeson

    Heisenberg strikes again!

    neeson, Sep 10, 2003, in forum: Python
    Replies:
    5
    Views:
    328
    Duncan Booth
    Sep 11, 2003
  2. Vijay Bajwa
    Replies:
    6
    Views:
    2,011
    Jerry Coffin
    Feb 16, 2007
  3. funfly3

    Re: Jessica Reveals all "Again"

    funfly3, May 11, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    313
    funfly3
    May 12, 2007
  4. Aahz

    xkcd strikes again

    Aahz, Apr 21, 2008, in forum: Python
    Replies:
    0
    Views:
    236
  5. mike
    Replies:
    1
    Views:
    235
Loading...

Share This Page