Click here to Skip to main content

ASP.NET

   

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
Questionsmtp: help how make emails deliver to inbox not junk box Pinmemberawedaonline0:43 21 Feb '12  
AnswerRe: smtp: help how make emails deliver to inbox not junk box PinmvpRichard MacCutchan1:32 21 Feb '12  
Questionhelp how make emails deliver to inbox not junk box Pinmemberawedaonline0:42 21 Feb '12  
AnswerRe: help how make emails deliver to inbox not junk box PinmvpRichard MacCutchan1:31 21 Feb '12  
QuestionIIS URL Pinmemberzead21:46 20 Feb '12  
AnswerRe: IIS URL PinprotectorPete O'Hanlon23:04 20 Feb '12  
QuestionAccessing usercontrols inside placeholder control using jQuery Pinmembermeeram39520:26 20 Feb '12  
I have an aspx form which are having three usercontrols (basically 2 sets of radio buttons). All are placed dynamically on page load in a placeholder control.
I want to display the other radiobuttons(usercontrols) based on the previous selection. So for eg:
If I have three usercontrols, uc1, uc2, uc3 which are all having two sets of radio buttons. uc2 will display only if uc1 is selected and uc3 will display only if uc2 is selected.
 
How can I achieve this through jquery/javascript? All these controls should be loaded and visible should be hidden while loading the page.
 
I googled for sometime, but didn't get any effective result. Could anybody please help.
 
Following is my code:
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Src="~/DI_UserControls/AppForm0602.ascx" TagName="AppForm602" TagPrefix="AppForm602" %>
<%@ Register Src="~/DI_UserControls/AppForm0719.ascx" TagName="AppForm719" TagPrefix="AppForm719" %>
<%@ Register Src="~/DI_UserControls/AppForm0466.ascx" TagName="AppForm466" TagPrefix="AppForm466" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
 
    <div>
    <table>            
        <tr>
            <td>
                <asp:PlaceHolder ID="DIPlaceHolder" runat="server"></asp:PlaceHolder>
               
            </td>
        </tr>
    </table>
    </div>
protected void Page_Load(object sender, EventArgs e)
    {
        SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["con1"].ConnectionString.ToString());
        SqlCommand cmd = new SqlCommand();
        cmd.CommandText = "sp_GetPages";
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Connection = con;
        cmd.Parameters.AddWithValue("@PageID", 12);
        cmd.Parameters.AddWithValue("@ApplicationID", 157);
        SqlDataAdapter adpt = new SqlDataAdapter(cmd);
        DataTable dt = new DataTable();
        adpt.Fill(dt);
        cmd.CommandText = "sp_GetPageDependency";
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Connection = con;
        cmd.Parameters.Clear();
        cmd.Parameters.AddWithValue("@PageID", 12);
        SqlDataAdapter adpt1 = new SqlDataAdapter(cmd);
        DataTable dt1 = new DataTable();
        adpt1.Fill(dt1);
         foreach (DataRow row in dt.Rows)
        {
            int colValue = Convert.ToInt32(row[4].ToString());
            switch (colValue)
            {
               
                case 602:
                    obj602 = LoadControl("~/DI_UserControls/AppForm0602.ascx") as DI_UserControls_AppForm0602;
                    obj602.ID = "602";
 

                    DIPlaceHolder.Controls.Add(obj602);
                    DIPlaceHolder.Controls.Add(InsertLineBreaks(1));
 
                    break;
                case 466:
                    obj466 = LoadControl("~/DI_UserControls/AppForm0466.ascx") as DI_UserControls_AppForm0466;
                    obj466.ID = "466";
 

                    DIPlaceHolder.Controls.Add(obj466);
                    DIPlaceHolder.Controls.Add(InsertLineBreaks(1));
                    break;
}
}
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.

AnswerRe: Accessing usercontrols inside placeholder control using jQuery Pinmemberjkirkerx15:43 21 Feb '12  
AnswerRe: Accessing usercontrols inside placeholder control using jQuery PinmemberShameel23:31 21 Feb '12  
QuestionHow to generate a barcode generator in ASP.NET Pinmemberblueskysinger16:28 20 Feb '12  
QuestionAsp.net4.0: Ajax Control ToolKit Pinmemberranu.khandelwal@gmail.com2:06 20 Feb '12  
AnswerRe: Asp.net4.0: Ajax Control ToolKit Pinmemberantish15:42 20 Feb '12  
QuestionDelete all existing files prior to publish + Recover deleted files PinmemberNTheOne1:04 20 Feb '12  
AnswerRe: Delete all existing files prior to publish + Recover deleted files Pinmemberfrazzle-me17:25 20 Feb '12  
AnswerRe: Delete all existing files prior to publish + Recover deleted files PinmemberShameel23:33 21 Feb '12  
QuestionTF31002: Unable to connect to this Team Foundation Server Pinmembersekar_14841:01 20 Feb '12  
QuestionMulti-file input [modified] PinmemberAli Al Omairi(Abu AlHassan)1:48 19 Feb '12  
AnswerRe: Multi-file input PinmvpMark Nischalke5:10 19 Feb '12  
GeneralRe: Multi-file input PinmemberAli Al Omairi(Abu AlHassan)22:08 19 Feb '12  
GeneralRe: Multi-file input Pinmemberantish15:55 20 Feb '12  
Questionproject for travel agency Pinmemberzemzela7:46 18 Feb '12  
AnswerRe: project for travel agency PinmvpRichard MacCutchan22:40 18 Feb '12  
QuestionMove nodes of tree View up or down. PinmemberMember 322226422:42 16 Feb '12  
AnswerRe: Move nodes of tree View up or down. Pinmembermark merrens12:20 17 Feb '12  
QuestionWatin On Windows 8 PinmemberKevin Marois8:46 16 Feb '12  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Beta | 2.5.120517.1 | Last Updated 22 May 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid