前台
<a href="/shujuku/users/show.aspx?id=<%=Session["yonghuID"] %>">我的主页</a>
注意:sqldatasource里面不能用这个,不然会提示错误。
Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "/shezhi.aspx?id="+Session["yonghuID"].ToString());
<asp:SqlDataSource ID="sqlKaideke"runat="server"ConnectionString="<%$ ConnectionStrings:isharingConnectionString %>"
SelectCommand="SELECT *FROM [Lcts]WHERE ([yonghuID] = @yonghuID)">
<SelectParameters>
<asp:SessionParameter Name="yonghuID"SessionField="yonghuID"Type="Int64"/>
</SelectParameters>
</asp:SqlDataSource>
public string strid = "";
strid = Request.Params["id"];//从页面的QueryString 、Form、Cookies、ServerVariables里检索名称为“id”的值。
<a href="/shujuku/lcts/modify.aspx?id=<%=strid %>">但是</a>
<a href="/shujuku/mirolcts/show.aspx?id=<%#Eval("weikeID") %>">
file: "<%=shipinURL %>",
image: "<%= wkFengmianURL %>",
src='<%#DataBinder.Eval(Container.DataItem, "kcFengmianID")%>'
后台
if (Session.Count<= 0 || Session["yonghuID"] == null)//session小于0或者yonghID为空,则登陆失败
{
pDenglu.Visible = true;//显示登录按钮
}
else
Image1.ImageUrl = Session["touxiangUrl"].ToString();
//获取管理员类型
stringyhLeixing = Session["yhLeixingID"].ToString();
Request.Params["id"]
strid =Request.Params["id"];
dbo.[Lcts-gzUsers]
INNER JOIN
dbo.Lcts
ON dbo.[Lcts-gzUsers].kechengID =dbo.Lcts.kechengID
INNER JOIN
dbo.Users
ON
dbo.[Lcts-gzUsers].yonghuID =dbo.Users.yonghuID AND dbo.Lcts.yonghuID = dbo.Users.yonghuID