Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

razor C# to vb.net

Posted on 2012-03-28
5
Medium Priority
?
495 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 1000 total points
ID: 37778150
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1000 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

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

688 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