Posted on: 7/9/2015 7:45:10 PM | Views : 660

I'm using Page.RegisterStartupScript to open a new web page in a window and pass values to the new page.  The code has worked fine until one of the page parameter values  ended up being "IF".  When the code is executed, I believe the "IF" value is being interpreted as an if statement.   As a result, I'm receiving the following error:  Message:Expected ')'.  Does anyone know how to handle this type of situation?  Is there anyway to reserved words ignored?
   In the sample below, the unit_code value is "IF"
   Dim script As String            script = "<script>window.open('Index.aspx?User_ID=" + User_ID.ToString + "&Unit_Code=" + Unit_Code + "&Section=" + Section + "')  ; </script>"   ...

Go to the complete details ...