Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7179769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:12:25+00:00 2026-05-28T17:12:25+00:00

I’m trying to create a querystring so when a user switches languages, the URL

  • 0

I’m trying to create a querystring so when a user switches languages, the URL changes to ?lang=NL, for example. I have this in the code behind on homepage.master (VB, NOT C#):

  Me.Request.QueryString("lang") <> Session([Global].SESSION_KEY_CULTURE) Then

Visual Studio underlines it in blue. When I hover over the left side of the statement, it says “Property Value Must Assign to the property or use its value” When I hover over the right side of the erred statement, it says, “End of Statement Expected”.

I’m not sure if the code I was given is C#, but when I use the Teleflex translator to check, it says “EOF Expected” and won’t translate.

All of this is tied into 3 classes I created, BasePage.vb, Culture.vb, and Global.vb. But I think it’s just this line that’s screwing everything up. If anybody knows the solution, I’d sincerely appreciate you sharing it with me, ’cause this is frustrating. Thanks!


p.s.: If necessary, here’s my entire homepage.master.vb:

  Partial Public Class Homepage

Inherits System.Web.UI.MasterPage

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Init

    If Session([Global].SESSION_KEY_CULTURE) Is Nothing OrElse _

    Me.Request.QueryString("lang") <> Session([Global].SESSION_KEY_CULTURE) Then

        RequestLanguageChange(Me.Request.QueryString("lang"))

    End If

End Sub



Protected Sub RequestLanguageChange(ByVal culture As String)



    'store requested language as new culture in the session

    Session([Global].SESSION_KEY_CULTURE) = culture



    'reload last requested page with new culture

    Server.Transfer(Request.Path)

End Sub

Private Function [Global]() As Object
    Throw New NotImplementedException
End Function

  End Class
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T17:12:26+00:00Added an answer on May 28, 2026 at 5:12 pm

    Have you tried putting the following two lines on a single line:

    If Session([Global].SESSION_KEY_CULTURE) Is Nothing OrElse _
    
        Me.Request.QueryString("lang") <> Session([Global].SESSION_KEY_CULTURE) Then
    

    Like:

    If Session([Global].SESSION_KEY_CULTURE) Is Nothing OrElse Me.Request.QueryString("lang") <> Session([Global].SESSION_KEY_CULTURE) Then    
    

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I have some data like this: 1 2 3 4 5 9 2 6
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.