Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/258.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 选中启用/禁用RadDatePicker on单选按钮_C#_Asp.net_Radio Button_Raddatepicker - Fatal编程技术网

C# 选中启用/禁用RadDatePicker on单选按钮

C# 选中启用/禁用RadDatePicker on单选按钮,c#,asp.net,radio-button,raddatepicker,C#,Asp.net,Radio Button,Raddatepicker,我对检查和更改单选按钮有点问题。我有三个单选按钮,一个RadDatePicker,一个textbox和一个按钮。我只是尝试使用文本框中给定的值搜索数据,具体取决于所选的单选按钮。我的问题是第三个单选按钮“dateCreated”。我想在选择第三个单选按钮时启用RadDatePicker。我还需要在代码隐藏中完成这项工作,而不是使用Javascript或任何其他方法。请帮忙 这是我的密码: .aspx 尝试添加自动回发属性alos <asp:RadioButton ID="dateSear

我对检查和更改单选按钮有点问题。我有三个单选按钮,一个RadDatePicker,一个textbox和一个按钮。我只是尝试使用文本框中给定的值搜索数据,具体取决于所选的单选按钮。我的问题是第三个单选按钮“dateCreated”。我想在选择第三个单选按钮时启用RadDatePicker。我还需要在代码隐藏中完成这项工作,而不是使用Javascript或任何其他方法。请帮忙

这是我的密码:

.aspx


尝试添加自动回发属性alos

 <asp:RadioButton ID="dateSearch" runat="server" GroupName="searchRad" Text="Date Created" oncheckedchanged="dateSearch_CheckedChanged" autopostback="true" />

谢谢,自动回邮功能非常有效。
protected void dateSearch_CheckedChanged(object sender, EventArgs e)
{
    if (dateSearch.Checked == true)
    {
        RadDatePicker2.Enabled = true;
    }

    else
    {
        RadDatePicker2.Enabled = false;
    }
}
 <asp:RadioButton ID="dateSearch" runat="server" GroupName="searchRad" Text="Date Created" oncheckedchanged="dateSearch_CheckedChanged" autopostback="true" />