随笔分类 - asp.net
摘要:string responseStr = null; string boundary = "----------------------" + DateTime.Now.Ticks.ToString("x"); byte[] boundarybytes...
阅读全文
摘要:转自:http://www.cnblogs.com/goody9807/archive/2012/05/16/2503761.html
阅读全文
posted @ 2013-06-14 22:14
csdnbbs
摘要:/// <summary> /// SFTP文件上传下载 /// </summary> public class SFtp { /// <summary> /// http://www.example-code.com/csharp/sftp_readDir.asp /// </summary> Chilkat.SFtp sftp = new Chilkat.SFtp(); /// <summary> /// 连接 /// </summary> /// <...
阅读全文
摘要:/// <summary> /// Excel导出写入 /// </summary> public class ExcelHelper { /// <summary> /// 当前行号【从0开始】 /// </summary> public int rowIndex = 0; /// <summary> /// Excel实例 /// </summary> private Workbook book = null; /// <summary>...
阅读全文
摘要:ListItem li = null; if (value != null) { //判断下拉框是否存在该value li = drp_hplxrRole.Items.FindByValue(value.ToString()); if (li != null) { drp_hplxrRole.SelectedValue = li.Value; ...
阅读全文
摘要:protected void Page_Load(object sender, EventArgs e) { Control c = this.ParseControl(" <asp:Button ID='Button1' runat='server' Text='Button' CommandArgument = 'b1' />"); PlaceHolder1.Controls.Add(c); Button b = (Button)FindControl("Button1");
阅读全文
摘要:// 在此处放置用户代码以初始化页面 Microsoft.Office.Interop.Word.Application word = new Microsoft.Office.Interop.Word.Application(); Type wordType = word.GetType(); Microsoft.Office.Interop.Word.Documents docs = word.Documents; // 打开文件 Type docsType = docs.GetType(); obje...
阅读全文
摘要:插件:http://www.Cult3D.com/download/cult.cab<OBJECT codeBase="http://www.Cult3D.com/download/cult.cab" height="200" width="200" classid="clsid:31B7EB4E-8B4B-11D1-A789-00A0CC6651A8"> <PARAM NAME="_cx" VALUE="5292"> <PARAM NAME=&
阅读全文
摘要:Ajax请求的WebService方法:[WebService(Namespace = "http://tempuri.org/")][WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. [System.Web.Script.Services.ScriptService]public class Pa
阅读全文
摘要:问题:类型“CheckBox”的控件“ctl01”必须放在具有 runat=server 的窗体标记内。解决方法:1. 把CheckBox控件放到 from内。2. 覆盖Page的VerifyRenderingInServerForm方法 public override void VerifyRenderingInServerForm(Control control) { //base.VerifyRenderingInServerForm(control); }
阅读全文
摘要:<asp:ScriptManager ID="ScriptManager1" runat="server" EnableHistory="True" EnableSecureHistoryState="False"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Wizard ID
阅读全文
摘要:问题: <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <%= DateTime.Now.ToString()%><br /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><br /> <asp:Button ID="Butto
阅读全文
摘要:1.创建profile数据库 A.打开:Visual Studio 命令提示cmd . B.执行:aspnet_regsql -A p -sqlexportonly pro.sql 命令 C.然后在SQL 管理器中执行pro.sql脚本。2.配置web.config <system.web> <profile enabled="true" automaticSaveEnabled="true" defaultProvider="AspNetSqlProfileProvider"> <providers&g
阅读全文
posted @ 2012-12-16 16:26
csdnbbs
摘要:为当前用户添加验证信息System.Web.Security.FormsAuthentication.SetAuthCookie("administrator", true);获取验证信息this.User.Identity.Namethis.User.Identity.IsAuthenticated //判断是否验证过了。
阅读全文
摘要:请修改注册表:HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main增加dword键TabProcGrowth,值为0就行!
阅读全文
摘要:Sys.WebForms.PageRequestManager.getInstance().add_endRequest( function (sender, e) { if (e.get_error()) { //取消框架自己的错误处理 e.set_errorHandled(true); if (e.get_response().get_timeOut()) { alert("请求已超时"); } ...
阅读全文
摘要:方法一:CS文件: protected void Button1_Click(object sender, EventArgs e) { System.Threading.Thread.Sleep(3000); this.ViewState["count"] = Convert.ToInt32(this.ViewState["count"])+1; this.Label1.Text = ViewState["count"].ToString(); }aspx文件 <asp:UpdatePanel ID="UpdateP
阅读全文
摘要:下拉框二级联动,页面无刷新A. (aspx) <asp:DropDownList ID="DropDownList1" runat="server" Height="16px" onchange="getChildren(this.options[this.selectedIndex].value, 'ddl');" Width="139px"> <asp:ListItem Value="0">请选择</asp:ListItem&
阅读全文
摘要:<%@ Page Title="主页" MaintainScrollPositionOnPostback="true" %>
阅读全文

浙公网安备 33010602011771号