有一个方法display(int n),我在Page_Load中调用了一次, 参数为1440. 如:display(1440);然后我想在点RadioButton1的时候,再调用一次,参数改为60, 如:display(60);     protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
    {
        display(60);
    }最后我想在点RadioButton2的时候,又调用一次,参数变为1, 如:display(1);
我用下面        
     if (!Page.IsPostBack)
        {
            display(1440);
        } 这个语句在Page_Load中判断. 为什么每次都还是显示的是display(1440);的信息??

解决方案 »

  1.   

    你先调试一下点RadioButton1和RadioButton2看它们的RadioButton_CheckedChanged事件执行了没?
      

  2.   

    protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
        {
            display(60);
        }这个不算执行吗?还要有什么语句??兄弟是新手,多指教!!谢谢
      

  3.   

    你确定执行了吗?
    建议在display(60);的地方设置断点调试确定一下
      

  4.   

    刚设置断点,没有执行display(60);请问怎么才能在点RadioButton的时候执行display(60);啊?我都写到CheckedChanged(object sender, EventArgs e)中了,为什么不执行呢???
      

  5.   

    怎么才能让RadioButton在点到得时候执行display(60);呢?