Translate c#.net code to vb.net code

Hi

I can usually do the translation myself, but this time I am a bit stumped

 Let us consider to rewrite Urls (more than 16000 links) using a table. Save original url and rewritten url in a table. Now add a class file in App_Code folder.

class UrlRewriteModule : IHttpModule
{
    public void Dispose()
    {
        // Nothing to dispose
    }

    public void Init(HttpApplication context)
    {
        context.BeginRequest += new EventHandler(context_BeginRequest);
    }

    void context_BeginRequest(object sender, EventArgs e)
    {
        HttpContext context = HttpContext.Current;
        
        if (context.Request.QueryString["Rewritten"] != null)
        {
                // Select the original url from database
                context.RewritePath(originalUrl);
        }
        else if (context.Request.HttpMethod == "GET")
        {
                // Select the rewritten url from database and redirect to that page with a querystring
        // or other identifier (like "?Rewritten=yes")
                context.Response.Redirect(rewrittenUrl + "?Rewritten=yes");
        }
    }

    // Other codes if needed
}


Hope this works for you.

 

-1
costrak
7/6/2007 12:06:12 PM
asp.net.getting-started 91979 articles. 2 followers. Follow

3 Replies
884 Views

Similar Articles

[PageSpeed] 56

I have used this site with good results.

http://authors.aspalliance.com/aldotnet/examples/translate.aspx


Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped.
1
jcrabtreesla
7/6/2007 1:36:45 PM

Check below link

 Conversion tools

HC

 


Haissam Abdul Malak
MCAD.NET
| Blog |
1
Haissam
7/6/2007 2:36:26 PM
Reply:

Web resources about - Translate c#.net code to vb.net code - asp.net.getting-started

Google Translate - Wikipedia, the free encyclopedia
Google Translate is a free statistical machine translation service provided by Google Inc. to translate a section of text, document or webpage, ...

Did Facebook Engagement Translate To Wins In Key Congressional Races?
The 2012 election postmortems continue, and research published in Capitol Hill newspaper Politico indicates that congressional candidates with ...

CSS Hat translates Photoshop layer styles to CSS3
This will be a huge hit. ∞ Read this on The Loop

Now you can help translate Facebook into any language
For months, volunteer translators around the world have been using Facebook’s innovative Translations application to translate all 24,000 phrases ...

Twitter Blog: It takes a community to translate Twitter
Twitter Blog It takes a community to translate Twitter 5355886907516812597 Monday, August 01, 2011 Twitter celebrated its first non-English launch ...

Mac App Store - Quick Translate Pro
Get Quick Translate Pro on the Mac App Store. See screenshots and ratings, and read customer reviews.

google translate - Flickr - Photo Sharing!
Explore jensminor's photos on Flickr. jensminor has uploaded 1567 photos to Flickr.

Terror laws: Baird government says 28 days needed to translate foreign languages, IT
Delays in investigating social media, foreign translation and gathering international evidence given as reasons justifying extension.

Google Translate adds iPad Split View, printed text translations for more languages
Google is rolling out a couple notable updates to its Google Translate apps that adds additional languages for translations of printed text and ...

Ford, Domino's, Dell, Others Work to Translate the Language of Emojis
Dell employed them for back-to-school marketing, Ford used them to promote its latest Focus model, and Domino's has invested in them to revolutionize ...

Resources last updated: 12/17/2015 5:51:29 PM