asp.netºǫ́»ñÈ¡js±í¸ñµÄÊý¾Ý
»áajaxµÄÆ®¹ý
¿´ÂÛ̳ÀïºÃ¶àÈËÔÚÕÒºǫ́»ñÈ¡js±í¸ñµÄÊý¾Ý£¬¾Í°ÑÒÔǰµÄ·½·¨·ÅÔÚÕâÀïÁË
ǰ̨£º
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>asp.net»ñȡǰ̨js±í¸ñµÄÊý¾Ý</title>
<style type="text/css"><!--
.dis-ime
{
ime-mode:disabled;
}
-->
</style>
</head>
<body>
<form id="form1" runat="server">
<h3>ʹÓÿͻ§¶ËÌí¼Ó±í¸ñµÄ±£´æ</h3>
<p>
Ö÷ÊǾÍÊÇÔÚÌá½»µ½·þÎñÆ÷֮ǰ£¬´¦ÀíºÃ±í¸ñÀïµÄÐÅÏ¢£¬È»ºó¸³Öµ¸øhidden<br />
to mqtheone:ÕâÀïÎÒÉèÖÃ×îºóÒ»ÁÐÖ»ÄÜÊäÈëÊý×ÖÁË£¬Äã¿ÉÒԲο¼Ò»ÏÂ
</p>
<div>
<table id="tab1">
<tr>
<th>Ãû³Æ</th>
<th>ÄÚÈÝ</th>
<th>Öµ</th>
<th></th>
</tr>
<tr>
<td><input type="text" /></td>
<td><input type="text" /></td>
<td><input type="text" class="dis-ime" onkeypress="return check(event)"/></td>
</tr>
</table>
<input type="button" style="margin-left:400px" mce_style="margin-left:400px" value="Ìí¼ÓÐÅÏ¢" id="btnAddInfo" /><br />
<asp:Button ID="Button1" runat="server" Text="Ìá½»" OnClientClick="initData();"
onclick="Button1_Click" />
<asp:HiddenField ID="HiddenField1"
runat="server" />
</div>
</form>
</body>
<script type="text/javascript"><!--
var $=function(){return document.getElementById(arguments[0]);};
var check=f
Ïà¹ØÎĵµ£º
Ê×Ò³£º
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head ......
ASP.NET C# Éú³É¾²Ì¬Ò³Ãæ¼òµ¥·½·¨
//Ô´ÂëÊÇÌæ»»µôÄ£°åÖеÄÌØÕ÷×Ö·û
string mbPath = Server.MapPath("template.html");
Encoding cod ......
Àý×Ó£º
using system.web.caching
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<html>
<script language="C#" runat="server">
void Page_Load(Object Src, EventArgs E) {
DataView Source;
// Retrieve the DataView obj ......
Ò»¡¢ÈÏʶWeb.configÎļþ
Web.config ÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ý.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈϵÄWeb.configÎļþ£¬°üÀ¨Ä¬ÈϵÄÅäÖÃÉèÖã ......
Asp.net³£ÓõÄ51¸ö´úÂë(·Ç³£ÊµÓÃ)
1.//µ¯³ö¶Ô»°¿ò.µã»÷תÏòÖ¸¶¨Ò³Ãæ
CODE:
Response.Write("<script>window.alert('¸Ã»áԱûÓÐÌá½»ÉêÇë,ÇëÖØÐÂÌá½»£¡')</script>");
Response.Write("<script>window.location ='http://www.51aspx.com/bizpulic/upmeb.aspx'</script&g ......