代码:<asp:Panel ID="picPanel" runat="server" GroupingText="图片上传" CssClass="picPanel">
                <div id="panel_main1" class="panel_main" runat="server">
                    <div id="main1_left" class="main_left">
                        <asp:FileUpload ID="fileUpLoad1" runat="server" ToolTip="选择上传文件" />
                        <asp:TextBox ID="txtPicDesc1" runat="server" TextMode="MultiLine" Wrap="true" width="200px" height="120px" ToolTip="添加图片说明"></asp:TextBox><br />
                        <asp:RadioButton ID="rdoLogo1" GroupName="rdoImgType1" runat="server" Text="企业Logo" />
                        <asp:RadioButton ID="rdoNews1" GroupName="rdoImgType1" runat="server" Text="文章图片" /><br />      Control rdoBtnDesc = picPanel.FindControl("rdoImgType1") as RadioButton;
        if (rdoBtnDesc == null)
        {
            Response.Write("没有数据!");
        }
        else
        {
            Response.Write(rdoBtnDesc.ID);
        }

解决方案 »

  1.   

    用ID找,picPanel.FindControl("rdoLogo1")
      

  2.   

    picPanel.FindControl("rdoImgType1") as RadioButton;
    FindControl("ID") 是这个把 rdoLogo1
      

  3.   

    web页上的,用组件的ID去找,rdoLogo1
      

  4.   

    asp.net页面中找控件应该是找他的ID你这是找单选按钮的分组名称当然找不到。
    Control rdoBtnDesc = picPanel.FindControl("rdoLogo1") as RadioButton;
    Control rdoBtnDesc1 = picPanel.FindControl("rdoNews1") as RadioButton;
      

  5.   

    FindControl 在页命名容器中搜索带指定标识符的服务器控件。它不在页所包含的命名容器中递归搜索控件。
      

  6.   

    FindControl方法其作用是根据ID(注意既不是UniqueID也不是ClientID)在Control所在的命名容器中寻找相应控件