简单的代码 - 从VB.net转换为c#.net(web dev) [英] Simple code - convert from VB.net to c#.net (web dev)
问题描述
您好,
任何人都知道如何在c#中执行以下操作 - 使用内联代码块?
<%If Request.Form (姓名)=" Gary"然后%>
< asp:RequiredFieldValidator ID =" GarysValidation" ErrorMessage =" Gary,你
选择了错误的选项< BR>"的ControlToValidate = QUOT;姓名" Display =" Dynamic"
runat =" server">< / asp:RequiredFieldValidator>
<%End If if>
感谢您的帮助,
问候,
加里。
Hello,
Anyone know how to do the following in c# - using inline codeblocks?
<% If Request.Form("Name") = "Gary" Then %>
<asp:RequiredFieldValidator ID="GarysValidation" ErrorMessage="Gary, you
have chosen the wrong option<BR>" ControlToValidate="Name" Display="Dynamic"
runat="server"></asp:RequiredFieldValidator>
<% End If %>
Thanks for any help,
Regards,
Gary.
推荐答案
您可以使用许多免费的在线C#/ VB.NET代码转换器。
这里有一些,没有特别的顺序。
检查出来......看看你最喜欢哪一个。
http://www.carlosag.net/Tools/CodeTr...r/default.aspx
http://www.dotnettaxi.com/Tools/ Converter.aspx
http:// www .developerfusion.co.uk / uti ... btocsharp.aspx
http://www.eggheadcafe.com/articles/...converter.aspx
Juan T. Llibre,asp.net MVP
asp.net faq: http://asp.net.do/faq/
foros de asp.net,en espa?ol:< a rel =nofollowhref =http://asp.net.do/foros/target =_ blank> http://asp.net.do/foros/
===================================
" Gary" < g@nospam.com在消息新闻中写道:Og ************* @ TK2MSFTNGP04.phx.gbl ...
There''s many free online C#/VB.NET code converters you can use to do that.
Here''s a few, in no particular order.
Check them out...and see which one you like best.
http://www.carlosag.net/Tools/CodeTr...r/default.aspx
http://www.dotnettaxi.com/Tools/Converter.aspx
http://www.developerfusion.co.uk/uti...btocsharp.aspx
http://www.eggheadcafe.com/articles/...converter.aspx
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espa?ol : http://asp.net.do/foros/
===================================
"Gary" <g@nospam.comwrote in message news:Og*************@TK2MSFTNGP04.phx.gbl...
您好,
任何人都知道如何在c#中执行以下操作 - 使用内联代码块?
<%If Request.Form(")姓名)=" Gary"然后%>
< asp:RequiredFieldValidator ID =" GarysValidation" ErrorMessage =" Gary,你选错了
选项< BR>"的ControlToValidate = QUOT;姓名" Display =" Dynamic"
runat =" server">< / asp:RequiredFieldValidator>
<%End If if>
感谢您的帮助,
问候,
加里。
Hello,
Anyone know how to do the following in c# - using inline codeblocks?
<% If Request.Form("Name") = "Gary" Then %>
<asp:RequiredFieldValidator ID="GarysValidation" ErrorMessage="Gary, you have chosen the wrong
option<BR>" ControlToValidate="Name" Display="Dynamic"
runat="server"></asp:RequiredFieldValidator>
<% End If %>
Thanks for any help,
Regards,
Gary.
(通过Instant C#)
<%
if(Request) .Form [" Name"] ==" Gary")
{
%>
< asp :RequiredFieldValidator ID =" GarysValidation" ErrorMessage =" Gary,你
选择了错误的选项< BR>"的ControlToValidate = QUOT;姓名" Display =" Dynamic"
runat =" server">< / asp:RequiredFieldValidator>
<%
}
%>
-
David Anton
www.tangiblesoftwaresolutions.com
即时C#:VB转换为C#转换器
Instant VB:C#到VB转换器
即时C ++:C#/ VB到C ++转换器
即时Python:C#/ VB到Python转换器
" ;加里"写道:
(via Instant C#)
<%
if (Request.Form["Name"] == "Gary")
{
%>
<asp:RequiredFieldValidator ID="GarysValidation" ErrorMessage="Gary, you
have chosen the wrong option<BR>" ControlToValidate="Name" Display="Dynamic"
runat="server"></asp:RequiredFieldValidator>
<%
}
%>
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
Instant Python: C#/VB to Python converter
"Gary" wrote:
您好,
任何人都知道如何在c#中执行以下操作 - 使用内联代码块?
<%If Request.Form(" Name")=" Gary"然后%>
< asp:RequiredFieldValidator ID =" GarysValidation" ErrorMessage =" Gary,你
选择了错误的选项< BR>"的ControlToValidate = QUOT;姓名" Display =" Dynamic"
runat =" server">< / asp:RequiredFieldValidator>
<%End If if>
感谢您的帮助,
问候,
加里。
Hello,
Anyone know how to do the following in c# - using inline codeblocks?
<% If Request.Form("Name") = "Gary" Then %>
<asp:RequiredFieldValidator ID="GarysValidation" ErrorMessage="Gary, you
have chosen the wrong option<BR>" ControlToValidate="Name" Display="Dynamic"
runat="server"></asp:RequiredFieldValidator>
<% End If %>
Thanks for any help,
Regards,
Gary.
在线转换器不会转换内嵌的asp.net代码Juan。 (请参阅我的
其他回复转换)。
-
David Anton
www.tangiblesoftwaresolutions.com
即时C#:VB转换为C#转换器
Instant VB:C#到VB转换器
即时C ++:C#/ VB到C ++转换器
即时Python:C#/ VB到Python转换器
" ; Juan T. Llibre写道:
The on-line converters won''t convert in-line asp.net code Juan. (see my
other reply for the conversion).
--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C#/VB to C++ converter
Instant Python: C#/VB to Python converter
"Juan T. Llibre" wrote:
你可以使用许多免费的在线C#/ VB.NET代码转换器。
这里有一些,没有特别的顺序。
检查出来......看看你最喜欢哪一个。
http://www.carlosag.net/Tools/CodeTr...r/default.aspx
http://www.dotnettaxi.com/Tools/Converter .aspx
http:// www。 developerfusion.co.uk/uti...btocsharp.aspx
http://www.eggheadcafe.com/articles/...converter.aspx
Juan T. Llibre,asp.net MVP
asp.net faq: http://asp.net.do/faq/
foros de asp。 net,en espa?±ol: http://asp.net.do/foros/
===================================
" Gary" < g@nospam.com在消息新闻中写道:Og ************* @ TK2MSFTNGP04.phx.gbl ...
There''s many free online C#/VB.NET code converters you can use to do that.
Here''s a few, in no particular order.
Check them out...and see which one you like best.
http://www.carlosag.net/Tools/CodeTr...r/default.aspx
http://www.dotnettaxi.com/Tools/Converter.aspx
http://www.developerfusion.co.uk/uti...btocsharp.aspx
http://www.eggheadcafe.com/articles/...converter.aspx
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espa?±ol : http://asp.net.do/foros/
===================================
"Gary" <g@nospam.comwrote in message news:Og*************@TK2MSFTNGP04.phx.gbl...
您好,
任何人都知道如何在c#中执行以下操作 - 使用内联代码块?
<%If Request.Form(")姓名)=" Gary"然后%>
< asp:RequiredFieldValidator ID =" GarysValidation" ErrorMessage =" Gary,你选错了
选项< BR>"的ControlToValidate = QUOT;姓名" Display =" Dynamic"
runat =" server">< / asp:RequiredFieldValidator>
<%End If if>
感谢您的帮助,
问候,
加里。
Hello,
Anyone know how to do the following in c# - using inline codeblocks?
<% If Request.Form("Name") = "Gary" Then %>
<asp:RequiredFieldValidator ID="GarysValidation" ErrorMessage="Gary, you have chosen the wrong
option<BR>" ControlToValidate="Name" Display="Dynamic"
runat="server"></asp:RequiredFieldValidator>
<% End If %>
Thanks for any help,
Regards,
Gary.
这篇关于简单的代码 - 从VB.net转换为c#.net(web dev)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!