Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Ò»¸öASPÎÊÌâ..À´¿´ÏÂ

HTML code:

[align=left]int releId = this.ddlUserType.SelectedIndex;
this.gvUsers.DataSourceID = "odsUserByRoleId";
if (this.gvUsers.Rows.Count == 0)
{
this.gvUsers.DataSourceID = "odsUser";
}[/align]


Á½¸ö²»Í¬Êý¾ÝÔ´ID: "odsUser"->²éÕÒËùÓÐÓû§; "odsUserByRoleId"->¸ù¾ÝÓû§½ÇÉ«²éÕÒÓû§.
ÎÊÌâ: Èç¹û"odsUserByRoleId"Êý¾ÝÔ´²éÕҵĽá¹ûΪ¿ÕÔòÈÃËüÖ¸¶¨ËùÓвéÕÒËùÓÐÓû§µÄÊý¾ÝÔ´, ÈçºÎ¶¨ÒåIFÌõ¼þ.
¿´²»¶®£¡£¡

Äã×Ô¼º²»ÊÇÒѾ­Ð´ÁËif

Õâ¸öIF²»ÐÐ!!!

ÄÇÄãÖ±½ÓÅжÏodsUserByRoleIdÊý¾ÝԴΪ²»Îª¿Õ£¬²»¾ÍµÃÁË£¬Èç¹ûΪ¿Õ£¬¾ÍÓÃ"odsUser"->²éÕÒËùÓÐÓû§£¬Êý¾ÝÔ´°ó¶¨

ÄãµÄif  Ôõô³öÎÊÌâÁË°¡£¿

ÎÒдÁËÒ»¸ö¼òµ¥µÄ£¬ Äã¿´¿´£¬
ÕâÑùÌæ»»Êý¾ÝԴ֮ǰ£¬Ê×ÏÈҪעÒâдÉÏ 
this.GridView1.DataSource = null;
È·±£Êý¾ÝԴΪ¿Õ£¬²»È»»á³ö´íµÄ/

DataTable table = new DataTable();
        DataTable table1 = new DataTable();

        DataColumn c1 = new DataColumn("id1");
        table.Columns.Add(c1);
        DataColumn c2 = new DataColumn("id2");
        table1.Columns.Add(c2);
     


Ïà¹ØÎÊ´ð£º

ASP¼òµ¥ÎÊÌâ

conn.asp

<%
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&server.MapPath("Connt ......

aspÒ³Ãæµ÷ÊÔÎÊÌâ

½¨ÁËÒ»¸öÕ¾µã£¬ÀïÃæÓÐ login.aspx. events.aspx µÈµÈ ÆäËûµÄÒ³Ãæ¡£


µ«ÊÇÎÒµ÷ÊÔ ÆäËûÒ³ÃæµÄʱºò£¬±Ä³öÀ´µÄ×ÜÊÇ login.aspx Ò³Ãæ¡£

¸Õѧasp ÇëÖ¸½Ì
ÄãÉèÖÃÆðʼҳÁË°É¡£¡£

¶÷ÔõôȡÏûÄØ£¿

Òªµ ......

asp±íµ¥Ìá½»ÎÊÌâ

Çë¸÷λ¸ßÊÖ°ï½â¾ö,¼±!!!
<script language="JavaScript" type="text/javascript">
function CheckInput(){
if (document.frm.loginname.length =0){
alert('ÇëÕý ......

asp´¥·¢Ê¼þÎÊÌâ

ÔÚÒ»¸ö·¢±íÎÄÕµÄÒ³Ã棬Èç¹ûÖÐ;¹Ø±ÕÒ³Ã棬ÕâÌáʾÊÇ·ñ·ÅÆú±à¼­£¬
Èç¹ûµã»÷·ÅÆú£¬ÔòתÏòÌîд·ÅÆúÔ­ÒòµÄ½çÃ棬
Èç¹ûµã²»·ÅÆú£¬ÕâÍ£ÁôÔÚÔ­Ò³Ã棬
Èç¹ûÊǵã»÷Ò³ÃæµÄ³¬¼¶Á´½Ó£¬Ôò´¥·¢Ê¼þʧЧ

ÈçºÎ±àд´ú ......

ASP½µÐòÎÊÌâ

    <%
  Sql="select top 8 * from NewsData where d_classid in (select classid from NewsClass where ParentID=16)"
Rs.Open Sql, conn, 1,1
Do Until Rs.Eof ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ