User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 397,646 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,446 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting

Radiobutton Problem

Join Date: Jul 2008
Posts: 1
Reputation: pfdsilva is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
pfdsilva pfdsilva is offline Offline
Newbie Poster

Re: Radiobutton Problem

  #10  
Jul 16th, 2008
The code within Button1_Click function throws a run time exception. Use this one instead.

protected void Button1_Click(object sender, EventArgs e)
    {
        if (ProductsSelectedIndex < 0)
        {
            Label2.Text = "Please make a selection";
            
        }
        else
        {
            GridViewRow gd = GridView1.Rows[ProductsSelectedIndex];
            Label2.Text = gd.Cells[0].Text;   // replace 0 with the column whose text you want
        }


    }
Thanks
Last edited by Tekmaven : Jul 16th, 2008 at 3:09 am. Reason: Code tags
Reply With Quote  
All times are GMT -4. The time now is 11:01 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC