asp.net³É³¤ÈÕ¼Ç
1¡¢½¨Á¢Êý¾Ý²ã Á¬½ÓÊý¾Ý¿â->½¨Á¢Êý¾Ý¼¯*.xsd->±íÖн¨Á¢²éѯ·½·¨
2¡¢½¨Á¢ÒµÎñÂß¼²ã °ü×°TableAdapter·½·¨³ÉÀà
3¡¢½¨Á¢Ä¸°åÒ³ºÍÕ¾µãµ¼º½£¨ CSS´ýѧϰ£©
4¡¢Ê¹ÓÃÊý¾ÝÔ´Õ¹ÏÖÊý¾Ý ÎåÖÖÊý¾ÝÔ´ ±à¼Êý¾ÝÔ´²ÎÊý ʹÓÃtableadapter·½·¨
5¡¢Ê¹ÓÃdropDownList¹ýÂËÖ÷-´Ó±¨±í
ʹÓÃtableadapter·½·¨ÉèÖÃÊý¾ÝÔ´ÏÔʾÊý¾Ý
(1)ÔÚÖ÷±í¼ÓÈëÁÐʹÓÃHyperLinkField Ôö¼ÓÒ»ÁÐÁ´½Ó µ½´Ó±í
HYperLinkFieldµÄtextÊôÐÔÉèÖÃÒ»¸öÏÔʾµÄÁ´½ÓÃû×Ö
×Ö¶ÎDataNavigateUrlFieldsÊôÐ԰󶨵½³¬Á´½ÓµÄNavigateUrlÊôÐÔµÄ×Ö¶ÎÀý£ºProductID
DataNavigateUrlFormatStringÊôÐԶ԰󶨵½³¬Á´½ÓµÄNavigateUrlÊôÐÔµÄÖµÓ¦ÓõĸñʽÉ趨Àý£º Default2.aspx?ProductID={0}
¿çÒ³´Ó±í WhereʹÓòÎÊýÔ´QueryString½ÓÊÕ´ÓÖ÷±í´«¹ýÀ´µÄ×Ö¶Î
(2)À©Õ¹ÖªÊ¶µã£ºImageField£¨Ê¹ÓÃURLÏòGridViewÌí¼ÓͼƬ£©
Ìí¼ÓÒ»¸öImageField,½«DataImageUrlField="PictureURL" //,ͼÏñURL°ó¶¨µ½PictureURL×Ö¶Î,
ÔÚºóÖôúÂëÖмÓÈ룺
protected void Page_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable();
// define the table’s schema
dt.Columns.Add(new DataColumn("PictureURL", typeof(string)));
// Create the four records
DataRow dr = dt.NewRow();
dr["PictureURL"] = ResolveUrl("~/Images/bbs.sakuramoon.cn__13386124_34835.jpg");
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["PictureURL"] = ResolveUrl("~/Images/bbs.sakuramoon.cn__17892967_20501.jpg");
&nbs
Ïà¹ØÎĵµ£º
<system.web>
<!--********³ö´íÒ³µÄÉ趨********-->
<customErrors mode="On" defaultRedirect="~/Error.htm"> </customErrors> ......
asp.net ajaxÖÐÎÄÂÒÂëµÄ½â¾ö£¿
2010-01-19 12:06
ÒÔǰûÔõô×ÐϸµÄÑо¿¹ýajax,Ö»ÊÇÓõ½Á˾ÍÖ±½ÓÄùýÀ´ÓÃ,·¢ÏÖÁËÎÊÌâÔÙÕÒ½â¾ö·½·¨.ÒÔÏÂÊÇÎÒÔÚÕÒ½â¾öÎÊÌâµÄ¹ý³ÌÖеÄÒ»µãССµÄ×ܽá.
Ò».̸AjaxµÄGetºÍPostµÄÇø±ð
Get·½Ê½:
ÓÃget·½Ê½¿É´«Ëͼòµ¥Êý¾Ý£¬µ«´óСһ°ãÏÞÖÆÔÚ1KBÏ£¬Êý¾Ý×·¼Óµ½urlÖз¢Ë ......
ÕâÊÇҪʵÏֵŦÄÜ£º
µÚÒ»²½£ºÍÏÈëGridView¿Ø¼þ ²¢ÇÒÍê³É²éѯËùÓÐÊý¾ÝµÄ·½·¨ ͨ¹ýthis.GridView1.DataSource »ñÈ¡¼¯ºÏÊý¾Ý GridView1.DataBind() °ó¶¨Êý¾Ý
µÚ¶þ²½£ºÊµÏÖȫѡ¹¦ÄÜ
1. Ò³Ãæ´úÂ룺
´úÂë
<asp:TemplateField HeaderText="ȫѡ">
&nbs ......
asp.net »ñÈ¡html¿Ø¼þµÄÖµµÄ´úÂëÈçÏ£º
WebForm1.aspx£º
< INPUT ID="TXT" TYPE="TEXT" RUNAT="SERVER" VALUE="AAAAAA">
< INPUT TYPE="BUTTON" RUNAT="SERVER" VALUE="BTNTEST" ID="BUTTON1"&nb ......
//ÒÔÏ´úÂë¸ù¾Ý±ðÈËÎÄÕºÍ×Ô¼ºÕûÀí
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
namespace WebApplication1
{
public partial class DownfFile : System.Web.UI.Page
{
p ......