I have a problem implementing the mobile command button as the image button. The command button is suppose to behave like an ImageButton is we set its Imageurl property.But this does not happens.
Following are the issues when i create a mobile command on the page load programmatically with its imageurl property set to and image url and click event mapped to a event handler
1.The problem is that when i access the page from a mobile device the the image button dosent shows the image which i set in the imageurl property, althought it shows if i view the page on the pc browser.
2.Second problem is that the event doesnt fine if i click the button.this is the problem with pc as wel as mobile browsers.
Following is the code that i use:
System.Web.UI.MobileControls.Command cd =
new System.Web.UI.MobileControls.Command();
cd.ImageUrl = "~/pics/abc";
cd.Click += new System.EventHandler(img1_Click);
Form1.Controls.Add(cd);
public void img1_Click(object sender,System.EventArgs
e)
Please suggest me a solution for this problem. I am using vs2005
Mobile Web formadaptive rendering mobile device nokiaMobile Web Forms Visual Studio 2003ASP.NET 2.0mobileMobile ControlsMobile Web Formsmobile asp.netMobile controls asp.net httpbrowsercapabilities ismobiledevice.mobiMobileOptimized desktop layout mobilemobile formmobile device asp link buttonsmobi
Have u tried with mobile device or mobile emulator?
I am using vs2005 professional version (8.0.50727.42) Fremework: 2.0.50727.I created a simple mobile webform and placed a mobile command button on it and I give an image url in the imageurl property of the button.In the commandbutton click event i write
some code for ex say Response.Write("Hello")
The problem while executing the code in Mobilebrowser is that the image is not displayed and the event is not fired when i click the button.But is pc browser the image is displayed but then , the event is not fired.
Member
23 Points
58 Posts
mobile command button with Imageurl Property:absolutely useless
Oct 04, 2008 08:06 AM|codetoad|LINK
I have a problem implementing the mobile command button as the image button. The command button is suppose to behave like an ImageButton is we set its Imageurl property.But this does not happens.
Following are the issues when i create a mobile command on the page load programmatically with its imageurl property set to and image url and click event mapped to a event handler
1.The problem is that when i access the page from a mobile device the the image button dosent shows the image which i set in the imageurl property, althought it shows if i view the page on the pc browser.
2.Second problem is that the event doesnt fine if i click the button.this is the problem with pc as wel as mobile browsers.
Following is the code that i use:
System.Web.UI.MobileControls.Command cd = new System.Web.UI.MobileControls.Command();
cd.ImageUrl = "~/pics/abc";{
Response.Redirect(http://abcd.com/abc.gif");}
Although i got the solution to the first problem from this solution
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.aspnet.mobile/2006-04/msg00001.html
Please suggest me a solution for this problem. I am using vs2005
Mobile Web form adaptive rendering mobile device nokia Mobile Web Forms Visual Studio 2003 ASP.NET 2.0 mobile Mobile Controls Mobile Web Forms mobile asp.net Mobile controls asp.net httpbrowsercapabilities ismobiledevice .mobi MobileOptimized desktop layout mobile mobile form mobile device asp link buttons mobi
Star
7759 Points
651 Posts
Re: mobile command button with Imageurl Property:absolutely useless
Oct 09, 2008 03:38 AM|Guang-Ming Bian - MSFT|LINK
Hi codetoad ,
I tried a sample with vs20005 mobile web form, it works fine. Image are visiable, event are fired perfectly.
I didn't do any configuration.
The sample I tried is same to you.
If you still can't solve it, can you please told how to reproduce it.
Best regards,
Guang-Ming Bian - MSFT
Member
23 Points
58 Posts
Re: mobile command button with Imageurl Property:absolutely useless
Oct 10, 2008 06:45 AM|codetoad|LINK
Have u tried with mobile device or mobile emulator?
I am using vs2005 professional version (8.0.50727.42) Fremework: 2.0.50727.I created a simple mobile webform and placed a mobile command button on it and I give an image url in the imageurl property of the button.In the commandbutton click event i write some code for ex say Response.Write("Hello")
The problem while executing the code in Mobilebrowser is that the image is not displayed and the event is not fired when i click the button.But is pc browser the image is displayed but then , the event is not fired.
I got the solution for event firing problem solved for both pc and mobile browser on this link ---> http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.aspnet.mobile/2006-04/msg00001.html
But but the problem of display of the image still remains for mobilebrowsers
Look at a similar post---- http://forums.asp.net/p/976415/1239524.aspx
None
0 Points
2 Posts
Re: mobile command button with Imageurl Property:absolutely useless
Oct 29, 2008 03:18 PM|astinus|LINK
Hello!, for the second problem.. go to this post http://forums.asp.net/p/976415/2713053.aspx#2713053
The first issue, depends on the cellphone you are using. In Blackberrys the button won't show.. but in HTM yes.
Sorry for the bad English.
Nicolas.