C#.NET更改标签的文本 [英] c# .net change label text
本文介绍了C#.NET更改标签的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好。我试图用这个code,但由于某种原因,这是行不通的。真正需要这方面的帮助。问题是,标签不从标签改名,当我进入该网站。
< ASP:标签ID =标签1=服务器文本=标签>< / ASP:标签>
<%
Label1.Text =测试;
如果(的Request.QueryString [身份证]!= NULL)
{
字符串测试=的Request.QueryString [身份证];
Label1.Text =杜哈日NUlånatfilmen:+测试;
}
%>
解决方案
您应该转换测试类型>>>> test.tostring();
更改最后一行是:
Label1.Text =杜哈日NUlånatfilmen:+ test.tostring();
Hello for I trying to use this code but for some reason it doesn't work. Really need help with this. The problem is that the label doesn't change name from "label" when I enter the site.
<asp:Label ID="Label1" runat="server" Text="label"></asp:Label>
<%
Label1.Text = "test";
if (Request.QueryString["ID"] != null)
{
string test = Request.QueryString["ID"];
Label1.Text = "Du har nu lånat filmen:" + test;
}
%>
解决方案
you should convert test type >>>> test.tostring();
change the last line to this :
Label1.Text = "Du har nu lånat filmen:" + test.tostring();
这篇关于C#.NET更改标签的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文