• λ我爱Aspx >> Asp.Net >> 初学asp.net应该记住的东西
  • 初学asp.net应该记住的东西

  • :未知  Դ:非寒日志  :2007-4-21 0:45:35  ؼ:.net,asp.net,asp
  • </script>

    24.datagrid选定比较底下的行时,为什么总是刷新一下,然后就滚动到了最上面,刚才选定的行因屏幕的关系就看不到了

    page_load

    page.smartNavigation=true

    25.在Datagrid中修改数据,当点击编辑键时,数据出现在文本框中,怎么控制文本框的大小 ?

    private void DataGrid1_ItemDataBound(obj sender,DataGridItemEventArgs e)

    {

    for(int i=0;i<e.Item.Cells.Count-1;i++)

    if(e.Item.ItemType==ListItemType.EditType)

    {

    e.Item.Cells.Attributes.Add("Width", "80px")

    }

    }

    26.对话框

    private static string ScriptBegin = "<script language=\"JavaScript\">";

    private static string ScriptEnd = "</script>";

    public static void ConfirmMessageBox(string PageTarget,string Content)

    {

    string ConfirmContent="var retValue=window.confirm('"+Content+"');"+"if(retValue){window.location='"+PageTarget+"';}";

    ConfirmContent=ScriptBegin + ConfirmContent + ScriptEnd;

    Page ParameterPage = (Page)System.Web.HttpContext.Current.Handler;

    ParameterPage.RegisterStartupScript("confirm",ConfirmContent);

    //Response.Write(strScript);

    }

    Ҷƪл˵?
  • һƪ无题
    һƪ从前之前,后来以后