Posts Categorized: ASP.NET
SiteMap menu with icons
リンク: SiteMap menu with icons.
While binding a Menu (or TreeView: everything in this article applies to TreeView as well) to a SiteMapDataSource is very easy, it can prove challenging to find how to extend the site map
ASP.NET Forums – setfocus to username in control of CreateUserWizard
jwadsworthのおかげて、この問題が解決しました。
リンク: ASP.NET Forums – setfocus to username in control of CreateUserWizard.…
ONDotnet.com: Personalization in ASP.NET
Working with WebParts Page, WebPart Zones & WebParts
リンク: Working with WebParts Page, WebPart Zones & WebParts – 123aspx.com ASP.NET Resource Directory.
Source Code’s Included
リンク: Building WebParts in ASP .Net 2.0.
Source Code’s included
リンク: Anonymous Personalization Trick in Web Parts – The Code Project …
ASP.NET Development Center: Introducing the ASP.NET 2.0 Web Parts Framework
サンプル付き、わかりやすく説明。
リンク: ASP.NET Development Center: Introducing the ASP.NET 2.0 Web Parts Framework.…
ASP.NET程序中常用代码汇总(五)
リンク: ASP.NET程序中常用代码汇总(五) – dotnet.csdn.net 团队blog (测试).
…41.判断是否为数字 /**////
/// 名称:IsNumberic /// 功能:判断输入的是否是数字 /// 参数:string oText:源文本 /// 返回值: bool true:是 false:否 ///
public bool IsNumberic(string oText) { try { int var1=Convert.ToInt32 (oText); return true;
ASP.NET程序中常用代码汇总(四)
リンク: ASP.NET程序中常用代码汇总(四) – dotnet.csdn.net 团队blog (测试).
31. 当文件在不同目录下,需要获取数据库连接字符串(如果连接字符串放在Web.config,然后在Global.asax中初始化)
在Application_Start中添加以下代码:
AppSettings[“ConnStr“].ToString();
32.变量.ToString()
字符型转换 转为字符串
12345.ToString(“C“); //生成 ¥12,345.00
12345.ToString(“e“); //生成 1.234500e+004
12345.ToString(“f4“); //生成 12345.0000
12345.ToString(“x“); //生成 3039 (16进制)
12345.ToString(“p“); //生成 1,234,500.00%
33.变量.Substring(参数1,参数2);
截取字串的一部分,参数1为左起始位数,参数2为截取几位。 如:string s1 = str.Substring(0,2);
ASP.NET程序中常用代码汇总(三)
リンク: ASP.NET程序中常用代码汇总(三) – dotnet.csdn.net 团队blog (测试).
31. 当文件在不同目录下,需要获取数据库连接字符串(如果连接字符串放在Web.config,然后在Global.asax中初始化)
在Application_Start中添加以下代码:
AppSettings[“ConnStr“].ToString();
32.变量.ToString()
字符型转换 转为字符串
12345.ToString(“C“); //生成 ¥12,345.00
12345.ToString(“e“); //生成 1.234500e+004
12345.ToString(“f4“); //生成 12345.0000
12345.ToString(“x“); //生成 3039 (16进制)
12345.ToString(“p“); //生成 1,234,500.00%
33.变量.Substring(参数1,参数2);
截取字串的一部分,参数1为左起始位数,参数2为截取几位。 如:string s1 = str.Substring(0,2);
ASP.NET程序中常用代码汇总(二)
11.自定义异常处理
using System;
using System.Diagnostics;
namespace MyAppException
{
/**//// <summary>
/// 从系统异常类ApplicationException继承的应用程序异常处理类。
/// 自动将异常内容记录到Windows NT/2000的应用程序日志
/// </summary>
public class AppException:System.ApplicationException
{
public AppException()
{
if (ApplicationConfiguration.EventLogEnabled)LogEvent(“出现一个未知错误。“);
}
public AppException(string message)
{
LogEvent(message);
}
public AppException(string message,Exception innerException)
{
LogEvent(message);
if