Solved

razor C# to vb.net

Posted on 2012-03-28
5
490 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
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 explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

728 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