All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
PHP成为中国应用最广的网页编程语言_php资料_编程技术
GridView中利用隐藏的TemplateFied来进行数据访问_[Asp.Net教程]
.net组件开发系列(四)之事件处理机制,三个接口两个方法_[Asp.Net教程]
如何解决php能连接mssql但读取不到表_[PHP教程]
ajax和asp.net的配置文件_[Asp.Net教程]
delphi像“开始”菜单一样漂亮的菜单项实例
Gridview,,repeater,datalist,通用分页_[Asp.Net教程]
你必须知道的.NET之特性和属性_[Asp.Net教程]
初学网页javascript经典小教程总结_JavaScript技术_编程技术
C#类的声明方法_[Asp.Net教程]
Reading number is top 10 pictures
锄禾日了几个人?
9.3阅兵全景图5-地空反舰导弹梯队
The money of more than 100 countries and regions7
Desktop Wallpapers1
Beautiful vacuum girl3
Discharge accidentally Actresses by the breast4
China's first snake village3
含苞欲放的素颜美少女1
自己约的炮,含泪也要打完
In 2013 hercules Arnold classic1
Download software ranking
塘西风月痕
Photoshop 8.0图象编辑软件
Unix video tutorial11
Love the forty days
The hero
Boxer's Top ten classic battle8
C++编程教程第三版
Tram sex maniac 2 (H) rar bag9
中国结婚习俗实录
linux初级教程
归海一刀 published in(发表于) 2014/1/30 1:23:39 Edit(编辑)
asp.net编程中6条实用语句_[Asp.Net教程]

asp.net编程中6条实用语句_[Asp.Net教程]

asp.net编程中6条实用语句_[Asp.Net教程]

1.Panel 横向滚动,纵向自动扩展

<asp:panel style="overflow-x:scroll;overflow-y:auto;"></asp:panel>
2.回车转换成Tab
(1)

<script language="javascript" for="document" event="onkeydown">
  if(event.keyCode==13 && event.srcElement.type!=’button’ && event.srcElement.type!=’submit’ &&     event.srcElement.type!=’reset’ && event.srcElement.type!=’’&& event.srcElement.type!=’textarea’);
  event.keyCode=9;
</script>

(2) //当在有keydown事件的控件上敲回车时,变为tab

public void Tab(System.Web .UI.WebControls .WebControl webcontrol)
{
webcontrol.Attributes .Add ("onkeydown", "if(event.keyCode==13) event.keyCode=9");
}

3.DataGrid超级连接列
DataNavigateUrlField="字段名" DataNavigateUrlFormatString="http://xx/inc/delete.aspx?ID={0}"

4.自定义异常处理
//自定义异常处理类
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 (innerException != null)
  {
  LogEvent(innerException.Message);
  }
  }
  //日志记录类
  using System;
  using System.Configuration;
  using System.Diagnostics;
  using System.IO;
  using System.Text;
  using System.Threading;
  namespace MyEventLog
  {
  /// <summary>
  /// 事件日志记录类,提供事件日志记录支持
  /// <remarks>
  /// 定义了4个日志记录方法 (error, warning, info, trace)
  /// </remarks>
  /// </summary>
  public class ApplicationLog
  {
  /// <summary>
  /// 将错误信息记录到Win2000/NT事件日志中
  /// <param name="message">需要记录的文本信息</param>
  /// </summary>
  public static void WriteError(String message)
  {
  WriteLog(TraceLevel.Error, message);
  }
  /// <summary>
  /// 将警告信息记录到Win2000/NT事件日志中
  /// <param name="message">需要记录的文本信息</param>
  /// </summary>
  public static void WriteWarning(String message)
  {
  WriteLog(TraceLevel.Warning, message);  
  }
  /// <summary>
  /// 将提示信息记录到Win2000/NT事件日志中
  /// <param name="message">需要记录的文本信息</param>
  /// </summary>
  public static void WriteInfo(String message)
  {
  WriteLog(TraceLevel.Info, message);
  }



添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.