C#.NET更改标签的文本文本、标签、NET

2023-09-04 06:35:31 作者:风雨路人

您好。我试图用这个code,但由于某种原因,这是行不通的。真正需要这方面的帮助。问题是,标签不从标签改名,当我进入该网站。

 < ASP:标签ID =标签1=服务器文本=标签>< / ASP:标签>


<%
    Label1.Text =测试;
    如果(的Request.QueryString [身份证]!= NULL)
    {

        字符串测试=的Request.QueryString [身份证];
        Label1.Text =杜哈日NUlånatfilmen:+测试;
    }

     %>
 

解决方案 电脑上全部txt文本文档的图标变成了,怎么改

您应该转换测试类型>>>> 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();

 
精彩推荐