---restore content starts---
Repeater can click inside content to jump and transfer values
<ItemTemplate>
<tr>
<td> <a href= "readarticle1.aspx (address to jump)? id=<% #Eval (" UserID ")%>&articletitle=<% #Eval (" ArticleTitle ")%>" ><% #Eval ("UserID")%></td>
<td> <a href= "readarticle1.aspx (address to jump)? id=<% #Eval (" UserID ")%>&articletitle=<% #Eval (" ArticleTitle ")%>" ><% #Eval ("ArticleTitle")%></a></td>
</tr>
</ItemTemplate>
Add music
<embed src= "/Tong greatly-flying. mp3" (Address information for music) width= "1" height= "1" type= "Audio/mpeg" loop= "true" (whether looping) autostart= "true" (whether AutoPlay) id= "MP3"/>
Page jump and pass value
if (string) sqlhelper.sqlexecutescalar ("Select Userid,userpassword from users WHERE UserID = N '" +userid.text + "' and UserPassword = ' "+userpassword.text +" ' ")!=null)
{
String querystr = Userid.text;
Response.Write ("<script>alert (' login success ') </script>");
Response.Redirect ("http://localhost:20890/personal.aspx?a=" + Querystr + "");
}
Else
{
Response.Write ("<script>alert (' Login failed ') </script>");
}
Accept the Pass value
Userid.text = request.querystring["ID"];
Articletitle.text = request.querystring["ArticleTitle"];
Bind picture (not implemented)
<asp:image id= "Image1" runat= "Server" height= "212px" width= "179px" src= "~\result"/> (Error, implemented with controls in HTML)
SqlConnection conn = new SqlConnection (str);
Userid.text = request.querystring["a"];
Bloglist. DataSource = SQLHELPER.SELECTDT ("select * from author WHERE userid=n '" + userid.text + "'");
Bloglist. DataBind ();
Conn. Open ();
Userid.text = "associates Peng";
String SRCC = "Select UserPicture from Users WHERE userID =n '" + userid.text + "'";
SqlCommand cmd = new SqlCommand (SRCC, conn);
string result = cmd. ExecuteScalar (). ToString ();
---restore content ends---
Title:
<asp:label id= "Articletitlelabel" runat= "Server"/>
<a href = "readarticle.aspx?articletitle=<% #Eval (" ArticleTitle ")%>&authorid=<% #Eval (" UserID ")% >&articleid=<% #Eval ("ArticleID")%> ">
<% #Eval ("ArticleTitle")%>>
</a>
<br/>
Body:
<asp:label id= "Articlecontentlabel" runat= "Server"/>
<%# Eval ("Articlecontent"). ToString (). Substring (0,eval ("Articlecontent"). ToString (). Length >30?30:eval ("Articlecontent"). ToString (). Length)%>
</a>
<BR/>//Body retains the first 30 characters
. NET