asp.net页面中的问题来设置会话值 [英] problem in asp.net page to set value from session
本文介绍了asp.net页面中的问题来设置会话值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试动态设置值但得到错误
i am try to set the value dynamically but getting error
<td>
<asp:Label ID="Label1" runat="server" Text= '<%# Response.Write('Generate ' + Session["mType"] + ' Template' %>' Font-Bold="true" />
</td>
推荐答案
为什么不为此使用代码?
Why don't you use code behind for this?
Label1.Text = "Generate " + Session["mType"].ToString() + " Template";
无论如何都要尝试这样&自定义它
Anyway try like this & customize it
<asp:label id="Label1" runat="server" text="<%= Session[" mtype="].ToString() %>" font-bold="true" xmlns:asp="#unknown" />
并使用 String.Format
或<字符串连接的code> Stringbuilder
这篇关于asp.net页面中的问题来设置会话值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文