日期:2014-05-18  浏览次数:20432 次

哪位帮忙翻译一,C#->VB 关于Server.Transfer跨页面传对象
public string P1
{get{return TextBox1.Text;}}
public string P2
{get{return TextBox2.Text;}}
然后调用Server.Transfer方法
Server.Transfer("object.aspx");

目标页面包含以下代码:
SourceForm1 f1; 
f1=(SourceForm1)Context.Handler;
Label1.Text=f1.P1;
Label2.Text=f1.P2;

这段代码看懂了。但是如何用VB写?

------解决方案--------------------
VB.NET code

Dim f1 As SourceForm1 
f1 = DirectCast(Context.Handler, SourceForm1) 
Label1.Text = f1.P1 
Label2.Text = f1.P2