Displaying a string var in the .aspx page

Discussion in 'ASP .Net' started by mazdotnet, May 8, 2006.

  1. mazdotnet

    mazdotnet Guest

    Hi,

    I have the following code in the code-behind file

    public string section;
    section = Request["section"].ToString()

    and I like to display it in my .aspx page (included .ascx) but it's not
    working.

    I tried
    <a href="default.aspx?section=<#=section#>">

    is it possible to just place Request["section"].ToString() in for ex.
    default.aspx?section=Request["section"].ToString() ????


    Thanks
    MA
     
    mazdotnet, May 8, 2006
    #1
    1. Advertising

  2. Hi,

    Try replacing the # symbols in "<#=section#>" with % symbols.

    Doug

    "mazdotnet" wrote:

    > Hi,
    >
    > I have the following code in the code-behind file
    >
    > public string section;
    > section = Request["section"].ToString()
    >
    > and I like to display it in my .aspx page (included .ascx) but it's not
    > working.
    >
    > I tried
    > <a href="default.aspx?section=<#=section#>">
    >
    > is it possible to just place Request["section"].ToString() in for ex.
    > default.aspx?section=Request["section"].ToString() ????
    >
    >
    > Thanks
    > MA
    >
    >
     
    =?Utf-8?B?RG91ZyBTYWxvbW9u?=, May 8, 2006
    #2
    1. Advertising

  3. <%=xxx%>

    Daniel Fisher(lennybacon) | newtelligenceR AG
    blog: http://staff.newtelligence.net/danielf
    usergroup: http://vfl-niederrhein.net


    -----Original Message-----
    From: mazdotnet [mailto:]
    Posted At: Monday, May 08, 2006 3:39 PM
    Posted To: microsoft.public.dotnet.framework.aspnet
    Conversation: Displaying a string var in the .aspx page
    Subject: Displaying a string var in the .aspx page

    Hi,

    I have the following code in the code-behind file

    public string section;
    section = Request["section"].ToString()

    and I like to display it in my .aspx page (included .ascx) but it's not
    working.

    I tried
    <a href="default.aspx?section=<#=section#>">

    is it possible to just place Request["section"].ToString() in for ex.
    default.aspx?section=Request["section"].ToString() ????


    Thanks
    MA
     
    Daniel Fisher\(lennybacon\), May 8, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alvin Bruney

    Threads.. Session var lost, App var ok

    Alvin Bruney, Dec 2, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    383
    rooster575
    Dec 2, 2003
  2. thomson
    Replies:
    10
    Views:
    2,528
    Eliyahu Goldin
    Jun 20, 2005
  3. thomson
    Replies:
    0
    Views:
    404
    thomson
    Jun 20, 2005
  4. Fred
    Replies:
    3
    Views:
    341
    Alf P. Steinbach
    Aug 10, 2003
  5. Alex Vinokur
    Replies:
    4
    Views:
    491
    Ron Natalie
    Sep 24, 2003
Loading...

Share This Page