request query convert from vb to c#

Posted by hossam on Stack Overflow See other posts from Stack Overflow or by hossam
Published on 2010-03-14T13:35:30Z Indexed on 2010/03/14 13:45 UTC
Read the original article Hit count: 441

Filed under:

this code is made by vb,page name:main.aspx

when i type the url like that main.aspx?sStyle=0 it type word Yes in the page

and if i type the url like that main.aspx?sStyle=0 it type word No in the page

<%@ Page Language=VB Debug=true %>
<%
Dim sStyle

    If Request.QueryString("sStyle") = "0" Or Len(Request.QueryString("sStyle")) = 0 Then
        Me = 0
    ElseIf Request.QueryString("sStyle") = "1" Then
        Me = 1
    End If
%>

<%If sStyle = "0" Then%>
Yes
<%End If%>

<%If sStyle = "1" Then%>
No
<%End If%>

=========================================================

my question is how do i make the exact same page using c#

Regards

© Stack Overflow or respective owner

Related posts about c#