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();
Old question, but I had this issue as well, so after assigning the Text property, calling Refresh()
will update the text.
Label1.Text = "Du har nu lånat filmen:" + test;
Refresh();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With