Attributes.Add querystring

Discussion in 'ASP .Net' started by Tom, Nov 30, 2007.

  1. Tom

    Tom Guest

    Trying to build a querystring using Attributes.Add:
    return_ok.Attributes.Add("value",
    "http://mydomain.com/finish.aspx?finish=324234" + @"&email="
    + @"&verify=32423dasdf3");

    Renders this:

    <input name="return_ok" type="hidden" id="return_ok"
    value="http://mydomain.com/finish.aspx?finish=324234&amp;amp;email=&amp;amp;verify=32423dasdf3"
    />

    How to get just one & in the querystring?
    Tom, Nov 30, 2007
    #1
    1. Advertising

  2. Tom

    Nick Chan Guest

    use URLEncode


    On Nov 30, 10:08 am, "Tom" <> wrote:
    > Trying to build a querystring using Attributes.Add:
    > return_ok.Attributes.Add("value",
    > "http://mydomain.com/finish.aspx?finish=324234" + @"&email="
    > + @"&verify=32423dasdf3");
    >
    > Renders this:
    >
    > <input name="return_ok" type="hidden" id="return_ok"
    > value="http://mydomain.com/finish.aspx?finish=324234&amp;amp;email=&amp;amp;verify=32423dasdf3"/>
    >
    > How to get just one & in the querystring?
    Nick Chan, Nov 30, 2007
    #2
    1. Advertising

  3. Tom

    Tom Guest

    I've tried this just about every which way...and I never get just & in my
    html...

    URLEncode(the whole URL) - turns just about everything to garbage
    URLEncode("&")...no
    URLEncode("38")...no
    URLDecode("%26")...nope...I even tried URLEncode(URLDecode))...this is
    crazy! Glad i'm not a rocket syuntist...



    "Nick Chan" <> wrote in message
    news:...
    > use URLEncode
    >
    >
    > On Nov 30, 10:08 am, "Tom" <> wrote:
    >> Trying to build a querystring using Attributes.Add:
    >> return_ok.Attributes.Add("value",
    >> "http://mydomain.com/finish.aspx?finish=324234" +
    >> @"&email="
    >> + @"&verify=32423dasdf3");
    >>
    >> Renders this:
    >>
    >> <input name="return_ok" type="hidden" id="return_ok"
    >> value="http://mydomain.com/finish.aspx?finish=324234&amp;amp;email=&amp;amp;verify=32423dasdf3"/>
    >>
    >> How to get just one & in the querystring?

    >
    Tom, Nov 30, 2007
    #3
  4. Tom

    Nick Chan Guest

    when u pass domain.com?query

    u have to URLEncode(query)

    when you read query, you don't have to URLDecode anything

    try URLEncode("&") and response.write it


    On Nov 30, 11:14 pm, "Tom" <> wrote:
    > I've tried this just about every which way...and I never get just & in my
    > html...
    >
    > URLEncode(the whole URL) - turns just about everything to garbage
    > URLEncode("&")...no
    > URLEncode("38")...no
    > URLDecode("%26")...nope...I even tried URLEncode(URLDecode))...this is
    > crazy! Glad i'm not a rocket syuntist...
    >
    > "Nick Chan" <> wrote in message
    >
    > news:...
    >
    >
    >
    > > use URLEncode

    >
    > > On Nov 30, 10:08 am, "Tom" <> wrote:
    > >> Trying to build a querystring using Attributes.Add:
    > >> return_ok.Attributes.Add("value",
    > >> "http://mydomain.com/finish.aspx?finish=324234" +
    > >> @"&email="
    > >> + @"&verify=32423dasdf3");

    >
    > >> Renders this:

    >
    > >> <input name="return_ok" type="hidden" id="return_ok"
    > >> value="http://mydomain.com/finish.aspx?finish=324234&amp;amp;email=&amp;amp;verify=32423dasdf3"/>

    >
    > >> How to get just one & in the querystring?- Hide quoted text -

    >
    > - Show quoted text -
    Nick Chan, Dec 3, 2007
    #4
    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. Mehdi
    Replies:
    6
    Views:
    36,093
    sloan
    Apr 6, 2006
  2. Max
    Replies:
    1
    Views:
    476
    Joe Kesselman
    Sep 22, 2006
  3. P4trykx
    Replies:
    2
    Views:
    1,804
    bruce barker
    Jan 31, 2007
  4. james_027

    class attributes & data attributes

    james_027, Jun 20, 2007, in forum: Python
    Replies:
    2
    Views:
    369
    Bruno Desthuilliers
    Jun 20, 2007
  5. Adeel Ahmad
    Replies:
    1
    Views:
    422
    Anthony Jones
    Mar 7, 2006
Loading...

Share This Page