Asp.Net ¼òµ¥¿¼Ìâ¹ÜÀíϵͳ
default.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Data.OleDb;
using System.IO;
namespace Web0531
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
db.dataBind(ListView1, "select * from exam order by id");
try
{
int PageSize = (int)Session["PageSize"]; // ±£Ö¤´ÓÐÞ¸ÄÒ³ÃæÄÜ·µ»Øµ½ÔÀ´µÄÒ³Ãæ
int StartRowIndex = (int)Session["StartRowIndex"];
((DataPager)ListView1.FindControl("DataPager1")).SetPageProperties(StartRowIndex, PageSize, true);
}
catch { }
}
}
// Êý¾ÝÏî°ó¶¨ºó£¬½«ÕýÈ·´ð°¸µÄÑ¡Ïî“À¶É«¡¢¼Ó´Ö”ÏÔʾ
protected void ListView1_ItemDataBound(object sender, ListViewItemEventArgs e)
{
try
{
Label lb = (Label)e.Item.FindControl("answerLabel"); // È¡´ð°¸
string ans = lb.Text.Trim() + "Label"; // Èç¹û´ð°¸ÊÇa;b;c;dÆäÖÐÖ®Ò»
Label lbans = (Label)e.Item.FindControl(ans); // ûÓдð°¸Ê±»á³ö´í
lbans.CssClass = "bb"; // ÉèÖôð°¸Ñ¡ÏîµÄÑùʽ
}
catch { }
}
// ·Ò³Ê±Ö´ÐÐ
protected void ListView1_PagePropertiesChanged(object sender, EventArgs e)
{
int PageSize = ((DataPager)ListView1.FindControl("DataPager1")).PageSize; // ÿҳ¼Ç¼Êý
int StartRo
Ïà¹ØÎĵµ£º
ÔÚʹÓÃAJAX½øÐгÌÐò¿ª·¢µÄʱºò£¬Ò»Ö±¶¼»áÃæ¶ÔÒ»¸ö»º´æµÄÎÊÌ⣡£¡
¼´ÊÇ£¬ÉÏ´ÎÇëÇóµÄʱºò£¬ÒòΪÄãµÄSQLÓï¾ä»òÕßÆäËûÔÒò£¬webserviceÖзµ»ØֵΪ¿Õ£¬²»ÊÇÄãÏëÒªµÄ½á¹û¼¯£¬ÔÚÄã·¢ÏÖwebserviceÖÐÓï¾äÌå³ö´íºó£¬½øÐÐÐ޸ģ¬ÖØвâÊÔ£¬ÈÔÈ»ÊÇÉϴεķµ»Ø½á¹û£¡¸Ð¾õ¾ÍÏñÄãµÄÐÞ¸ÄÍêÈ«ÎÞЧ¡£¡£
Æäʵ£¬ÕâÊÇÔÚAJAXµ ......
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
using System.Timers;
using System.Data;
using System.Data.SqlClient;
namespace SMS_joke
{
/// <summary>
/// Global µÄժҪ˵Ã÷¡£
/// </summary>
public class ......
Õû¸öSQLºÍAsp.net(vb.net)Ò»Æð´ò°üµÄÈ«¹ý³ÌдһÏ¡£
Ò».×¼±¸±ØÒªµÄÎļþ
1. SQL½Å±¾Îļþ£¬Éú³ÉÒÔºó°²×°¹ý³ÌÖÐÐèÒªµÄ±íºÍ´æ´¢¹ý³ÌµÈµÈ£»
Éú³ÉÖ®ºó£¬¾ÍÔÝʱ°ÑËüÃüÃûΪdb.sql(×¢Òâ´óСд)
2.LisenceFile.rtfµÄ°²×°Îļþ£¬ÒòΪÎÒµÄϵͳÊǸöÈ˵ģ¬¶øÇÒfreeµÄ£¬ËùÒÔ¾ÍûÓÐ×ö¡£Õâ¸öÒÔºóÒ²ÊÇÒªÓõ½µÄ¡£
¶þ.ÔÚ×Ô¼ºÏÖÓеÄÏîÄ¿Àïà ......
ÔÚweb¿ª·¢ÖÐ,¾³£ÒªÓõ½¿Ø¼þµÄOnClientClickÓëOnClickʼþ.
Èç¹ûʹÓò»µ±,¾³£»áÓöµ½Ò»Ð©ÒâÁÏÖ®ÍâµÄÊÂÇé·¢Éú,ÈÃÈËÃþ²»×ÅÍ·ÄÔ.ÏÂÃæ¾Í½«ÎÒµÄһЩСС×ܽáµÀÀ´:
Ê×ÏÈÎÒÃÇÒªÁ˽âÕâÁ½¸öʼþ:
OnClientClickÊÇ¿Í»§¶Ëʼþ·½·¨.Ò»°ã²ÉÓÃJavaScriptÀ´½øÐд¦Àí.Ò²¾ÍÊÇÖ±½ÓÔÚIE¶ËÔËÐÐ.Ò»µã»÷¾ÍÔËÐÐ.
OnClickʼþÊÇ·þÎñÆ÷¶Ëʼþ´¦Àí ......