[英]Convert Code Snippet in C# to VB.Net
I want this code in VB.NET I can't convert it... 我想在VB.NET中使用此代码我无法将其转换为...
Code1 代码1
Response.Redirect("user.aspx?val=" + txtBox.Text);
string strVal = Request.QueryString["val"];
Code2 码2
Session["val"] = txtBox.Text;
Response.Redirect("user.aspx");
String strVal = (string) Session["val"];
Here's your translation: 这是你的翻译:
Response.Redirect("user.aspx?val=" & txtBox.Text)
Dim strVal As String = Request.QueryString("val")
and 和
Session("val") = txtBox.Text
Response.Redirect("user.aspx")
Dim strVal As String = DirectCast(Session("val"), String)
Code1: 代码1:
Response.Redirect("user.aspx?val=" & txtBox.Text)
Dim strVal As String
strVal=Request.QueryString("val")
Code2: 代码2:
Session("val)=txtBox.Text
Response.Redirect("user.aspx")
Dim strVal As String
strVal=Cstr(Session("val"))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.