日期:2014-05-19  浏览次数:20441 次

用户控件的使用
主页代码:
<%@register   tagprefix= "uc1 "   tagname= "newlist "   src= "newlist.ascx "%>
<%@   Page   Language= "vb "   AutoEventWireup= "false "   Codebehind= "Default.aspx.vb "   Inherits= "TheArticleSYS._Default "%>
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.0   Transitional//EN ">
<HTML>
<HEAD>
<title> 运城农业职业技术学院新闻管理系统欢迎您 </title>
<meta   name= "GENERATOR "   content= "Microsoft   Visual   Studio   .NET   7.1 ">
<meta   name= "CODE_LANGUAGE "   content= "Visual   Basic   .NET   7.1 ">
<meta   name= "vs_defaultClientScript "   content= "JavaScript ">
<meta   name= "vs_targetSchema "   content= "http://schemas.microsoft.com/intellisense/ie5 ">
</HEAD>
<body   MS_POSITIONING= "GridLayout ">
<form   id= "form1 "   runat= "server ">
<table   id= "table1 "   cellspacing= "0 "   cellpadding= "0 "   width= "762 "   border= "0 ">
<tr>
<td   colspan= "2 "> <img   src= "images/bg12.jpg "> </td>
</tr>
<tr>
<td   valign= "top "   width= "265 ">
<table   id= "table2 "   height= "145 "   cellspacing= "1 "   cellpadding= "1 "   width= "248 "   border= "1 ">
<tr>
<td   colspan= "2 "> <img   src= "images/search.jpg "> </td>
</tr>
<tr>
<td   width= "57 "   height= "30 "> 类别 </td>
<td   height= "30 "> <asp:DropDownList   ID= "dropdownlist1 "   Runat= "server "> </asp:DropDownList> </td>
</tr>
<tr>
<td   width= "57 "> <p> 检索内容 </p>
</td>
<td> <asp:TextBox   ID= "textbox1 "   Runat= "server "> </asp:TextBox> <asp:DropDownList   ID= "dropdownlist2 "   Runat= "server ">
<asp:ListItem   Value= "title "> 标题 </asp:ListItem>
<asp:ListItem   Value= "writer "> 作者 </asp:ListItem>
<asp:ListItem   Value= "keyword "> 关键字 </asp:ListItem>
</asp:DropDownList> </td>
</tr>
<tr>
<td   width= "92 "   colspan= "2 "> <asp:Button   ID= "button1 "   Runat= "server "   Text= "检索 "> </asp:Button> </td>
</tr>
</table>
</td>
<td>
<asp:DataList   ID= "datalist1 "   Runat= "server "   ShowFooter= "False "   BackColor= "white "   BorderStyle= "Double "
Width= "474px "   RepeatDirecti