locked
Redirecting code behind for VB RRS feed

  • Question

  • User1160500279 posted

    THIS IS THE REDIRECTING CODE BEHIND FOR C#

    protected void Page_Load(object sender, EventArgs e)
    {

    string subDomain = "subdomain";
    string subDomainUri = @"/MySubdomainFolder/Default.aspx";

    if (Request.ServerVariables["SERVER_NAME"].ToLower().Contains(subDomain))
    Response.Redirect(subDomainUri);
    }

    PLEASE I NEED FOR VB


    Thursday, April 8, 2010 5:55 AM

Answers

  • User-1364446067 posted

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
       
        Dim subDomain As String = "subdomain"
        Dim subDomainUri As String = "/MySubdomainFolder/Default.aspx"
       
        If Request.ServerVariables("SERVER_NAME").ToLower().Contains(subDomain) Then
            Response.Redirect(subDomainUri)
        End If
    End Sub


    You can use many available converters for this purpose.

    I converted it from here http://www.developerfusion.com/tools/convert/csharp-to-vb/

    --

    Mark as answer, if it answers you..

    --



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 8, 2010 8:19 AM