易截截图软件、单文件、免安装、纯绿色、仅160KB
热门标签: c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 最新文章 : asp.net

Asp.net中运用css

 在web开发中经常会碰到css样式的运用,我就在asp.net中运用样式进行了总结!
 1、使用style属性设置样式

n实例
•Style属性设置 
<asp:TextBox ID="TextBox1" runat="server"
style="background-color:Red; font-size:15px">
</asp:TextBox>
2、使用Cssclass属性设置样式步骤
•创建css样式表
<style type="text/css">
    .textStyle { BORDER-LEFT-COLOR: red; BORDER-BOTTOM-COLOR: red; FONT: 14pt verdana; WIDTH: 300px; BORDER-TOP-STYLE: dashed; BORDER-TOP-COLOR: red; BORDER-RIGHT-STYLE: dashed; BORDER-LEFT-STYLE: dashed; BACKGROUND-COLOR: yellow; BORDER-RIGHT-COLOR: red; BORDER-BOTTOM-STYLE: dashed }
    </style>
 
 •设置CssClass属性
<asp:TextBox ID="TextBox1" runat="server" CssClass="textStyle">
3、使用Style类
n声明Style类的步骤
•声明Style对象
•设置Style对象的属性

 
       Style style = new Style();
    ......

asp.net中实现Gridview的多行拖放, 以及跨控件拖放

学习JQuery时,发现JQuery只能做单行拖放, 于是花时间做了一个多行拖放的例子, 以备以后使用。 
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
 <script type="text/javascript" src="jquery-1.3.2.js"></script>
 <script type="text/javascript" src="jquery-ui-1.7.2.custom.js"></script>
 <script type="text/javascript">
  //===================================
  //dragg and drop sample program
  //authored by gujinsong@trans-cosmos
  //2009-11-11
  //===================================
  
  
  //temporary var that stored selected rows
  var SelectedRows = [];
  
  //forbid all select
  document.onselectstart = function() { return false; }
  
  //fires when dragg object go out the source table
  $(documen ......

asp.net客户端脚本调用webservice

 由于 asp.net ajax 封装了很多很好的方法,所以使用这个框架调用webwervice变的非常简单。
第一步
webservice 类的方法需要有scriptService的  attribute.
 namespace ServiceTest
{
/// <summary>
///WebService 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]
//若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。
// [System.Web.Script.Services.ScriptService]
public class MyWebService : System.Web.Services.WebService
{
public MyWebService()
{
//如果使用设计的组件,请取消注释以下行
//InitializeComponent();
}
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
第二步
在客户端使用scriptmanager来 设置webservice的路径
<asp:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Debug">
<Services>
<asp:ServiceReference Pat ......

asp.net客户端脚本调用页面方法

  第一步:
将某个页面的方法 有 webmethod  attribute;
[WebMethod]
//只能是 public static 的方法
public static DateTime GetCurrentTime()
{
return DateTime.UtcNow;
}
第二步:
 页面有一个ScriptManager 设置它的enablepagemethod=true;
asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" />
第三步:调用
PageMethods.方法名(回调函数)
<mce:script language="javascript" type="text/javascript"><!--
function getCurrentTime()
{
PageMethods.GetCurrentTime(getCurrentTimeSucceeded);
}

function getCurrentTimeSucceeded(result)
{
alert(result);
}

// --></mce:script> ......

ASP.NET 的模态窗体的处理

(一) 模态窗体的处理方法
1  javascript 语法:
var returnValue = window.showModalDialog(sURL [, vArguments] [,sFeatures])
非模态窗体:
vReturnValue = window.showModelessDialog(sURL [, vArguments] [,sFeatures])
参数说明:
sURL:必选参数,类型:字符串。用来指定对话框要显示的文档的URL。
vArguments:可选参数,类型:变体。用来向对话框传递参数。传递的参数类型不限,包括数组等。
对话框通过window.dialogArguments来取得传递进来的参数。
参数可以是对象,如 window 。
sFeatures:可选参数,类型:字符串。用来描述对话框的外观等信息,可以使用以下的一个或几个,用分号“;”隔开。详述如表下:
参数
取值
说明
dialogHeight
对话框高度,不小于100px,IE4中dialogHeight 和 dialogWidth 默认的单位是em,而IE5中是px,为方便其见,在定义modal方式的对话框时,用px做单位。
dialogWidth
对话框宽度
dialogLeft
离屏幕左的距离
dialogTop
离屏幕上的距离
Center
{yes | no | 1 | 0 }
窗口是否居中,默认yes,但仍可以指定高度和宽度。
Help
{yes | no | 1 | 0 }
是否显示帮助按钮,默认yes
Resi ......

什么是Asp.Net应用程序

 ASP.NET defines an application as the sum of all files, pages, handlers, modules, and executable code that can be invoked or run in the scope of a given virtual directory (and its subdirectories) on a Web application server. For example, an "order" application might be published in the "/order" virtual directory on a Web server computer. For IIS the virtual directory can be set up in the Internet Services Manager; it contains all subdirectories, unless the subdirectories are virtual directories themselves.
Each ASP.NET Framework application on a Web server is executed within a unique .NET Framework application domain, which guarantees class isolation (no versioning or naming conflicts), security sandboxing (preventing access to certain machine or network resources), and static variable isolation.
ASP.NET maintains a pool of HttpApplication instances over the course of a Web application's lifetime. ASP.NET automatically assigns one of these instances to process each incoming H ......
总记录数:2672; 总页数:446; 每页6 条; 首页 上一页 [346] [347] [348] [349] 350 [351] [352] [353] [354] [355]  下一页 尾页
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号