• 【杂记】ASP.Net Web开发


    一、弹出消息框

    Function AlertMsg(ByVal Msg_str As String) As String
            Return "<script language=javascript>alert('" & Msg_str & "')</script>"
        End Function

    Page.ClientScript.RegisterStartupScript(Me.GetType, "Alert", AlertMsg("消息通知"))

    ----------

    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "RedirectLoginPage", "<script language=javascript>window.parent.Bar.location='bar.aspx';</script>");

    ----------

    Between UpdatePanel

    System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType, "alt", "alert('" & lab_msg.Text & "')", True)

    二、简单的确认对话框

    btnSubmit.Attributes.Add("onclick", "return confirm('Confirm to submit?');")

    三、日历控件 

    代码
    1 Dim txtbox8_onfocus As String = "WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:true,skin:'whyGreen',readOnly:false,position:{top:'under'},maxDate:'#F{$dp.$D(\'" & TextBox12.ClientID & "\',{d:0});}',minDate:'" & Now.ToString("yyyy-MM-dd HH:mm") & "'})"
    2 TextBox8.Attributes.Add("onfocus", txtbox8_onfocus)
    3 Dim txtbox12_onfocus As String = "WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:true,skin:'whyGreen',readOnly:false,position:{top:'under'},minDate:'#F{$dp.$D(\'" & TextBox8.ClientID & "\',{d:0});}'})"
    4 TextBox12.Attributes.Add("onfocus", txtbox12_onfocus)

     四、showModelessDialog 缓存严重的解决办法

    <meta http-equiv="Expires" CONTENT="0">
        <meta http-equiv="Cache-Control" CONTENT="no-cache">
        <meta http-equiv="Pragma" CONTENT="no-cache">

  • 相关阅读:
    BZOJ3238 [Ahoi2013]差异 SA+单调栈
    BZOJ2754 [SCOI2012]喵星球上的点名 SA+莫队+树状数组
    Luogu P3251 [JLOI2012]时间流逝 期望dp
    Luogu P3962 [TJOI2013]数字根 st
    BZOJ3619 [Zjoi2014]璀灿光华 构造+dfs
    Codeforces 990G 点分治+暴力
    express基础项目创建
    Node.js 中使用 ES6 中的 import / export 的方法大全
    bootstrap 辅助工具
    python实现FTP服务器
  • 原文地址:https://www.cnblogs.com/wonder315/p/1900929.html
Copyright © 2020-2023  润新知