Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Mobile > Link Button control and anchor within page do not work in Mobile 6.0

Reply
Thread Tools

Link Button control and anchor within page do not work in Mobile 6.0

 
 
David C
Guest
Posts: n/a
 
      06-10-2008
I have posted this question, which I think is very simple on several
sites, and nobody seems to know what I am talking about. At my wits
end here. Please help.

I am putting together a site for mobile devices using regular ASP.NET
controls after giving up on "Mobile Web Forms" for several reasons.

Two problems.

LinkButton
========

The LinkButton control does not work in Mobile 6.0, even though it
works fine with the Mobile 6.0 emulators. My particular make and
model is Palm Treo 750, but I am observing similar issues with other
brands such as HTC, and Kiser.

When the user presses a LinkButton, it simply does not respond. Is
there a setting in the browser that can change? I know that it works
with Mobile 5.0, but not 6.0 (although emulators seem to have no
trouble with it). I suppose one option is the replace all LinkButtons
with Buttons, but I really don't want to do that.

Page Anchor
=========

Can't get it to work. When my URL looks like "myhpage.aspx?
id=85565#A" to redirect to an anchor within a page, it does not work
in any of the mobile devices I've tested with including emulators. Is
there a workaround to this? This is very important since the limited
size of the mobile screen, so I want to do what I can to help the user
not have to scroll a lot.

I have put together a sample application to demonstrate my problem.
Here is the link to it.
http://junk.petrotools.com/From.aspx

The code files are really simple.
***From.aspx
<form id="form1" runat="server">
<div>
<asp:LinkButton ID="LinkButton1" runat="server"
OnClick="LinkButton1_Click">Click Me</asp:LinkButton>
<br />
<asp:Label ID="Label1" runat="server"></asp:Label><br />
<br />
<asp:Button ID="Button1" runat="server"
OnClick="Button1_Click" Text="Send Me to another page" /></div>
</form>
***From.aspx.cs
public partial class From : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Label1.Text = "you clicked a link button";
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("ToPage.aspx#A");
}

}

ToPage.aspx
<form id="form1" runat="server">
<div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<a name="A">Here is my anchor</a>

</div>
</form>
 
Reply With Quote
 
 
 
 
Al Fitz
Guest
Posts: n/a
 
      07-31-2008
I went to your page and all three of the links worked fine. I'm using an
HTC6800 with Windows Mobile 6.0

"David C" wrote:

> I have posted this question, which I think is very simple on several
> sites, and nobody seems to know what I am talking about. At my wits
> end here. Please help.
>
> I am putting together a site for mobile devices using regular ASP.NET
> controls after giving up on "Mobile Web Forms" for several reasons.
>
> Two problems.
>
> LinkButton
> ========
>
> The LinkButton control does not work in Mobile 6.0, even though it
> works fine with the Mobile 6.0 emulators. My particular make and
> model is Palm Treo 750, but I am observing similar issues with other
> brands such as HTC, and Kiser.
>
> When the user presses a LinkButton, it simply does not respond. Is
> there a setting in the browser that can change? I know that it works
> with Mobile 5.0, but not 6.0 (although emulators seem to have no
> trouble with it). I suppose one option is the replace all LinkButtons
> with Buttons, but I really don't want to do that.
>
> Page Anchor
> =========
>
> Can't get it to work. When my URL looks like "myhpage.aspx?
> id=85565#A" to redirect to an anchor within a page, it does not work
> in any of the mobile devices I've tested with including emulators. Is
> there a workaround to this? This is very important since the limited
> size of the mobile screen, so I want to do what I can to help the user
> not have to scroll a lot.
>
> I have put together a sample application to demonstrate my problem.
> Here is the link to it.
> http://junk.petrotools.com/From.aspx
>
> The code files are really simple.
> ***From.aspx
> <form id="form1" runat="server">
> <div>
> <asp:LinkButton ID="LinkButton1" runat="server"
> OnClick="LinkButton1_Click">Click Me</asp:LinkButton>
> <br />
> <asp:Label ID="Label1" runat="server"></asp:Label><br />
> <br />
> <asp:Button ID="Button1" runat="server"
> OnClick="Button1_Click" Text="Send Me to another page" /></div>
> </form>
> ***From.aspx.cs
> public partial class From : System.Web.UI.Page
> {
> protected void Page_Load(object sender, EventArgs e)
> {
>
> }
> protected void LinkButton1_Click(object sender, EventArgs e)
> {
> Label1.Text = "you clicked a link button";
> }
> protected void Button1_Click(object sender, EventArgs e)
> {
> Response.Redirect("ToPage.aspx#A");
> }
>
> }
>
> ToPage.aspx
> <form id="form1" runat="server">
> <div>
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <a name="A">Here is my anchor</a>
>
> </div>
> </form>
>

 
Reply With Quote
 
 
 
 
Damon B.
Guest
Posts: n/a
 
      08-31-2008
I am having the same problem on my WM 5 Samsung Blackjack! Anyone have a
solution?

"David C" wrote:

> I have posted this question, which I think is very simple on several
> sites, and nobody seems to know what I am talking about. At my wits
> end here. Please help.
>
> I am putting together a site for mobile devices using regular ASP.NET
> controls after giving up on "Mobile Web Forms" for several reasons.
>
> Two problems.
>
> LinkButton
> ========
>
> The LinkButton control does not work in Mobile 6.0, even though it
> works fine with the Mobile 6.0 emulators. My particular make and
> model is Palm Treo 750, but I am observing similar issues with other
> brands such as HTC, and Kiser.
>
> When the user presses a LinkButton, it simply does not respond. Is
> there a setting in the browser that can change? I know that it works
> with Mobile 5.0, but not 6.0 (although emulators seem to have no
> trouble with it). I suppose one option is the replace all LinkButtons
> with Buttons, but I really don't want to do that.
>
> Page Anchor
> =========
>
> Can't get it to work. When my URL looks like "myhpage.aspx?
> id=85565#A" to redirect to an anchor within a page, it does not work
> in any of the mobile devices I've tested with including emulators. Is
> there a workaround to this? This is very important since the limited
> size of the mobile screen, so I want to do what I can to help the user
> not have to scroll a lot.
>
> I have put together a sample application to demonstrate my problem.
> Here is the link to it.
> http://junk.petrotools.com/From.aspx
>
> The code files are really simple.
> ***From.aspx
> <form id="form1" runat="server">
> <div>
> <asp:LinkButton ID="LinkButton1" runat="server"
> OnClick="LinkButton1_Click">Click Me</asp:LinkButton>
> <br />
> <asp:Label ID="Label1" runat="server"></asp:Label><br />
> <br />
> <asp:Button ID="Button1" runat="server"
> OnClick="Button1_Click" Text="Send Me to another page" /></div>
> </form>
> ***From.aspx.cs
> public partial class From : System.Web.UI.Page
> {
> protected void Page_Load(object sender, EventArgs e)
> {
>
> }
> protected void LinkButton1_Click(object sender, EventArgs e)
> {
> Label1.Text = "you clicked a link button";
> }
> protected void Button1_Click(object sender, EventArgs e)
> {
> Response.Redirect("ToPage.aspx#A");
> }
>
> }
>
> ToPage.aspx
> <form id="form1" runat="server">
> <div>
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <br />
> <a name="A">Here is my anchor</a>
>
> </div>
> </form>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
iPhone4,iPhone3,Ipad,Apple Mobile,Blackberry Mobile,HTC Mobile,LGMobile,Motorola Mobile,Nokia Mobile,Samsung Mobile chen selina C++ 0 07-13-2010 08:53 AM



Advertisments