Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Mobile / April 2005

Tip: Looking for answers? Try searching our database.

Redirection with Cell Phone Browsers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy - 31 Mar 2005 18:37 GMT
I have written an ASP.NET app that searches an XML database
for journal titles.  The app passes two session variables
(title and means of search) from one page to another.  I
only now got the session variables to work as intended.

The problem started when I press the Search command
control on my default.aspx page.  The appropriate code
is here:

private void cmdSeek_Click(object sender, System.EventArgs e)
{
   Utility Util = new Utility();
   if (Util.IsValidSearchPhrase(this.txtSeek.Text))
   {
       string resultsURL;

       Session["sought"] = (string) this.txtSeek.Text;
       Session["sortby"] = (string) this.rdoSortby.Selection.Value;

       resultsURL = this.ResolveUrl("results.aspx");
       this.RedirectToMobilePage(resultsURL);
   }
}

Now, the command control works as intended on browsers that access
the page via wired (IE, Netscape) or Wi-Fi (PocketIE, Palm/NetForce)
connections.  The control does *not* work on cell phone browsers like
OpenWave or BlackBerry.  I found out why on examining the ASP.NET
output to the OpenWave browser:  ASP.NET is interpreting the URL
as going back to default.aspx!

<anchor title="Seek">Search
   <go href="/ ... /Default.aspx">
       <postfield name="__EVENTTARGET" value="cmdSeek" />
       <postfield name="txtSeek" value="$(txtSeek)" />
       <postfield name="rdoSortby" value="$(rdoSortby)" />
   </go>
</anchor>

Is there any way to make ASP.NET interpreting the URL correctly?
Deepak - 04 Apr 2005 15:47 GMT
Andy,

I don't think your problem is the <go href..., because a asp.net web form
always posts to itself and your redirection is in the event handler of the
'Seek' command button. if your results.aspx is in the same folder as the
default.aspx try replacing

this.RedirectToMobilePage(resultsURL)

with

this.RedirectToMobilePage("results.aspx")

- Deepak

> I have written an ASP.NET app that searches an XML database
> for journal titles.  The app passes two session variables
[quoted text clipped - 36 lines]
>
> Is there any way to make ASP.NET interpreting the URL correctly?
Andy - 04 Apr 2005 16:51 GMT
Thank you very much, Deepak.

> Andy,
>
[quoted text clipped - 51 lines]
> >
> > Is there any way to make ASP.NET interpreting the URL correctly?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.