Solved

razor C# to vb.net

Posted on 2012-03-28
5
491 Views
Last Modified: 2012-03-29
I am learning mvc3. I found the following code

@helper Silverlight(string xapPath, string version) {  
   <div>        
    <p>Silverlight Helper</p>
    <p>@xapPath</p>      
    <p>@version</p>    
   </div>
}

Can you please convert it to vb.net please?

Regards,
Soumen
0
Comment
Question by:Soumen-Roy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 20

Assisted Solution

by:BuggyCoder
BuggyCoder earned 250 total points
ID: 37778150
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 250 total points
ID: 37779530
Try following

@helper Silverlight(xapPath as String, version as String)
   <div>        
    <p>Silverlight Helper</p>
    <p>@xapPath</p>      
    <p>@version</p>    
   </div>
End Helper

http://dotnetslackers.com/articles/aspnet/Razor-Functions-and-Helpers.aspx#s7-helpers-in-vb
0
 

Author Comment

by:Soumen-Roy
ID: 37780317
@codecruiser

no it not working. following errors are shown

1. Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement.
2. '#ExternalSource' directives cannot be nested.
3. Identifier expected.

regards
0
 

Author Comment

by:Soumen-Roy
ID: 37780402
ok ok its done. i am sorry,

instead of

@helper Silverlight(xapPath as String, version as String)
   <div>        
    <p>Silverlight Helper</p>
    <p>@xapPath</p>      
    <p>@version</p>    
   </div>
End Helper

i should use

@helper Silverlight(xapPath as String, version as String)
   @<div>        
    <p>Silverlight Helper</p>
    <p>@xapPath</p>      
    <p>@version</p>    
   </div>
End Helper

thanx
0
 

Author Closing Comment

by:Soumen-Roy
ID: 37785547
thanx
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question