Hai
what purpose u need to show label text ? actually u assign val to label text and change visible as true,so where u show label ? u try to check val pass in label text or not ? u need to find what value appear in val string ??
Actually u assign value in label text and also set visible as true. it will also visible label,but next line u redirect to another page so u cant see label text.So try to comment redirect line then only u see label.
OK try this,first add this in script
function testmsg(msg) {
alert(msg);
}
Add this line before redirect page
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Alert", "<script type='text/javascript'>testmsg('" + val + "');</script>", false);
u cant delay page redirect or cant show in textbox or label text,try show in alert msg.