Solved

razor C# to vb.net

Posted on 2012-03-28
5
486 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
  • 3
5 Comments
 
LVL 20

Assisted Solution

by:BuggyCoder
BuggyCoder earned 250 total points
Comment Utility
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 250 total points
Comment Utility
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
Comment Utility
@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
Comment Utility
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
Comment Utility
thanx
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
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…
This video discusses moving either the default database or any database to a new volume.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now