[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.mobile

Multiparameter Querystring Problem

Kurt Stricker

8/20/2002 4:13:00 AM

Using Mobile Toolkit 1.0 and the following code:

Dim xy As New MobileControls.MobileListItem()
xy.Text = oCont.PersonName & " (" &
oCont.Descriptions(0).Text & ")"
xy.Value = "ContDetails.aspx?BusinessKey=" &
Request.QueryString("BusinessKey") & "&CNum=" & iNum
List1.Items.Add(xy)

Page cannot be displayed in two of the Nokia emulators but
works in IE. If I comment out the &CNum it works fine.
Is there a problem using more than one value in a query
string to mobile devices?


4 Answers

Craig Deelsnyder

8/20/2002 4:46:00 AM

0

I saw another post elsewhere about this. Have no idea if that's a problem
in phones, but one thing you should always do is Server.URLEncode your URL
values (I believe that's the correct method and it's on Server). So put
that around your Request.Querystring() and iNum strings in your assignment
of xy.value

IE used to be very forgiving with URL's and special characters.

Otherwise, could be a problem in the phones.

"Kurt Stricker" <no_spam_kurtstricker@yahoo.com> wrote in message
news:408d01c247ef$34f3e470$37ef2ecf@TKMSFTNGXA13...
> Using Mobile Toolkit 1.0 and the following code:
>
> Dim xy As New MobileControls.MobileListItem()
> xy.Text = oCont.PersonName & " (" &
> oCont.Descriptions(0).Text & ")"
> xy.Value = "ContDetails.aspx?BusinessKey=" &
> Request.QueryString("BusinessKey") & "&CNum=" & iNum
> List1.Items.Add(xy)
>
> Page cannot be displayed in two of the Nokia emulators but
> works in IE. If I comment out the &CNum it works fine.
> Is there a problem using more than one value in a query
> string to mobile devices?
>
>


Kurt Stricker

8/20/2002 5:20:00 AM

0

I left off the URLEncode as it didn't work with that
either. I did some more testing and it is not a length of
Querystring issue. The & character is absolutely causing
the problem here. Any ideas???

Any idea what the answer
>-----Original Message-----
>I saw another post elsewhere about this. Have no idea if
that's a problem
>in phones, but one thing you should always do is
Server.URLEncode your URL
>values (I believe that's the correct method and it's on
Server). So put
>that around your Request.Querystring() and iNum strings
in your assignment
>of xy.value
>
>IE used to be very forgiving with URL's and special
characters.
>
>Otherwise, could be a problem in the phones.
>
>"Kurt Stricker" <no_spam_kurtstricker@yahoo.com> wrote in
message
>news:408d01c247ef$34f3e470$37ef2ecf@TKMSFTNGXA13...
>> Using Mobile Toolkit 1.0 and the following code:
>>
>> Dim xy As New MobileControls.MobileListItem
()
>> xy.Text = oCont.PersonName & " (" &
>> oCont.Descriptions(0).Text & ")"
>> xy.Value = "ContDetails.aspx?BusinessKey=" &
>> Request.QueryString("BusinessKey") & "&CNum=" & iNum
>> List1.Items.Add(xy)
>>
>> Page cannot be displayed in two of the Nokia emulators
but
>> works in IE. If I comment out the &CNum it works fine.
>> Is there a problem using more than one value in a query
>> string to mobile devices?
>>
>>
>
>
>.
>

wl

8/20/2002 7:23:00 AM

0

I have experienced the same thing. One queryparameter is OK, adding a second
one is casuing problems (took me a while to find this reason for my problems
...)

Wim

PS: My cellphone (Sony CMD-Z5) also seemed to have a problem with one than
one parameter...


"Kurt Stricker" <no_span_kurtstricker@yahoo.com> wrote in message
news:4ac501c247f8$7ef48210$3bef2ecf@TKMSFTNGXA10...
> I left off the URLEncode as it didn't work with that
> either. I did some more testing and it is not a length of
> Querystring issue. The & character is absolutely causing
> the problem here. Any ideas???
>
> Any idea what the answer
> >-----Original Message-----
> >I saw another post elsewhere about this. Have no idea if
> that's a problem
> >in phones, but one thing you should always do is
> Server.URLEncode your URL
> >values (I believe that's the correct method and it's on
> Server). So put
> >that around your Request.Querystring() and iNum strings
> in your assignment
> >of xy.value
> >
> >IE used to be very forgiving with URL's and special
> characters.
> >
> >Otherwise, could be a problem in the phones.
> >
> >"Kurt Stricker" <no_spam_kurtstricker@yahoo.com> wrote in
> message
> >news:408d01c247ef$34f3e470$37ef2ecf@TKMSFTNGXA13...
> >> Using Mobile Toolkit 1.0 and the following code:
> >>
> >> Dim xy As New MobileControls.MobileListItem
> ()
> >> xy.Text = oCont.PersonName & " (" &
> >> oCont.Descriptions(0).Text & ")"
> >> xy.Value = "ContDetails.aspx?BusinessKey=" &
> >> Request.QueryString("BusinessKey") & "&CNum=" & iNum
> >> List1.Items.Add(xy)
> >>
> >> Page cannot be displayed in two of the Nokia emulators
> but
> >> works in IE. If I comment out the &CNum it works fine.
> >> Is there a problem using more than one value in a query
> >> string to mobile devices?
> >>
> >>
> >
> >
> >.
> >


Frank Tse \(MS\)

8/21/2002 8:08:00 PM

0

I believe the problem is that WML content is XML so & needs to be encoded in
XML way. In this case, & needs to be encoded as &amp; when building query
string for links in XML content. A note is that you may need to do it in
device specific way so the encoding is applied only to WML devices.

Thanks,
Frank
http://w...
"This posting is provided "AS IS" with no warranties, and confers no
rights."

"wl" <sorry@no-spam.be> wrote in message
news:#V6eYkASCHA.3648@tkmsftngp11...
> I have experienced the same thing. One queryparameter is OK, adding a
second
> one is casuing problems (took me a while to find this reason for my
problems
> ...)
>
> Wim
>
> PS: My cellphone (Sony CMD-Z5) also seemed to have a problem with one than
> one parameter...
>
>
> "Kurt Stricker" <no_span_kurtstricker@yahoo.com> wrote in message
> news:4ac501c247f8$7ef48210$3bef2ecf@TKMSFTNGXA10...
> > I left off the URLEncode as it didn't work with that
> > either. I did some more testing and it is not a length of
> > Querystring issue. The & character is absolutely causing
> > the problem here. Any ideas???
> >
> > Any idea what the answer
> > >-----Original Message-----
> > >I saw another post elsewhere about this. Have no idea if
> > that's a problem
> > >in phones, but one thing you should always do is
> > Server.URLEncode your URL
> > >values (I believe that's the correct method and it's on
> > Server). So put
> > >that around your Request.Querystring() and iNum strings
> > in your assignment
> > >of xy.value
> > >
> > >IE used to be very forgiving with URL's and special
> > characters.
> > >
> > >Otherwise, could be a problem in the phones.
> > >
> > >"Kurt Stricker" <no_spam_kurtstricker@yahoo.com> wrote in
> > message
> > >news:408d01c247ef$34f3e470$37ef2ecf@TKMSFTNGXA13...
> > >> Using Mobile Toolkit 1.0 and the following code:
> > >>
> > >> Dim xy As New MobileControls.MobileListItem
> > ()
> > >> xy.Text = oCont.PersonName & " (" &
> > >> oCont.Descriptions(0).Text & ")"
> > >> xy.Value = "ContDetails.aspx?BusinessKey=" &
> > >> Request.QueryString("BusinessKey") & "&CNum=" & iNum
> > >> List1.Items.Add(xy)
> > >>
> > >> Page cannot be displayed in two of the Nokia emulators
> > but
> > >> works in IE. If I comment out the &CNum it works fine.
> > >> Is there a problem using more than one value in a query
> > >> string to mobile devices?
> > >>
> > >>
> > >
> > >
> > >.
> > >
>
>