Solved

razor C# to vb.net

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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

733 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