 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "a", "<script>alert('请选择您要上传的图片!');</script>");
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】

全局方案: 在资源方案视图中选中网站,右键,点击[添加ASP.NET 文件夹]->[App_GlobalResources] 再选中App_GlobalResources文件夹,右键,点击[添加新项],在弹出的对话框中选中“资源文件”,命名为“LocalizedText.resx”,点击[ 添加],如图所示: 双击LocalizedText.resx进行编辑,添加一…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
//适用于C#语言 //使用前需导入以下命名空间:using System.Web.Security; //第一个参数为需加密的字符串,第二个参数为加密的格式(只有SHA1和MD5两种,可任选一种) public string EncryptPassword(string PasswordString, string PasswordFormat)   &nbs…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
在Web.Config的<styletem.web>里面加入以下节点 <httpRuntime maxRequestLength="10240" useFullyQualifiedRedirectUrl="true" executionTimeout="100"/> maxRequestLength=10240…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
在web.config里 <configuration> <system.web> <customErrors mode="On" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAc…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
var ddr= document.getElementById("ctl00_ContentPlaceHolder3_Gw_Send1_DropDownList2"); alert(ddr.options[ddr.selectedIndex].text); var peoples = document.getElementById("ctl00_Conten…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
using System.Web.Mail; System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient();        client.Host = "smtp.163.com";//邮件服务器   …
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
有上述情况的一般分为两个情况 情况一: protected void Button1_Click(object sender, EventArgs e) { Button1.PostBack="XXX.aspx"; } 上述情况分析很简单:第一次点击按钮是给按钮赋值事件,当第二次点击的时候因为它有值了,所以执行了 情况二: 在你点击按钮的之前输入的文本框肯定…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
设置RadioButton的GroupName属性,把两个RadioButton控件的GroupName属性设置为相同的名称 如: <asp:RadioButton ID="RadioButton1" runat="server" GroupName="aa" Checked="true" />没有 …
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
private void DisplayUserTree(int nodeId, int role)     {         this.TreeView1.Nodes.Clear();         List<S…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
备份:use master;backup database @name to disk=@path; 恢复:use master;restore database @name from disk=@path; string dbFileName = txtDbFileName.Text.Trim();        …
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】

原因<!-- Inject Script Filtered --> Response.End 方法终止页的执行,并将此执行切换到应用程序的事件管线中的 Application_EndRequest 事件。不执行 Response.End 后面的代码行。 此问题出现在 Response.Redirect 和 Server.Transfer 方法中,因为这两种方法均在内部调用 R…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
 给按钮加个 CommandName属性 2 在repeater的ItemCommand事件内 根据 e.CommandName 来判断是哪个按钮被点击 然后做你的 数据库操作 例: <ASP:Button    runat="server"   commandname="delet…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
string str = Request.Url.AbsolutePath;              //等待截取的字符串         char[] spliter = new char[1]…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
public void CopyDirs(string srcPath, string aimPath)     {         // 检查目标目录是否以目录分割字符结束如果不是则添加之         if (aimP…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
*********************DataList*********************** <asp:DataList ID="DataList1" runat="server" RepeatColumns="3" DataSourceID="ObjectDataSource1"> 其中…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
******************前台********************   <input id="Button1" style="width: 87px" type="button" runat="server" value="添    加"   onclick="addthings()" /> <a…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】
代码如下,不信试试    <img id="img1" onerror="this.src='default1.gif'" height="130px" style="display:block" /> <asp:FileUpload ID="FileUpl…
 胡同里的砖头2013/12/19【.NET/Web】
胡同里的砖头2013/12/19【.NET/Web】