I am posting a new thread per the request of my online concierge Oliver. He
says this will help in getting my question answered by the MSDN support.
Thanks,
Kapil
Hi Kapil,
Thank you for posting and sorry for the delay.
Regarding on the two issues of the ASP.NET Mobile "Command" control you
mentioned, based on my research, here are some of my finding:
1. As for the "click" event, there does exist an known issue that the
command control's Click event will not fire correctly when the ImageUrl is
set. And this problem is planed to be fixed in the next version. Currently
there is a workaround:
because the problem is actually caused by something not stored correctly
with the ViewState(if the viewstate is empty ...), we can manually store
some data into viewState in the first request of the page so as to make it
non-empty. e.g:
# suppose there is a Label control (lblMessage) on the page
===========
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
lblMessage.Text = "Init Value";
}
}
===============
Then, the button's click event can fire correctlly (with ImageUrl set).
2. As for the Image's displaying in WML client, so far I haven't found any
document on this. However, it seems that the image info is not output for
WML client. I'll do some further research on this and will update you if I
got any updates.
Thanks for your understanding.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
kapilp - 03 Apr 2006 17:32 GMT
Hi Steven,
I implemented the fix. The fix works when I copy my project into IIS!
Thanks. One thing is that the fix only seems to work in IIS. If I run the
project using ASP.net development server(F5) then it does not work. Anyway no
big deal.
As far as the image not rendering i found the following article.
http://msdn2.microsoft.com/en-us/library/t32t3y06.aspx. It says:
"When a rendered form includes UI to submit the form results back to the
server, some WML-based devices require that the UI for the specified device
must be in the form of a <do> object at the start of the form. The Openwave
Up.Browser browsers are an example of such a device."
So basically the command object is being rendered as a <do> tag. If this is
the case I should be able to put an <img> tag with the <do> tag but I cant do
custom rendering in .net mobile.
Then I found this article:
http://msdn2.microsoft.com/en-us/library/wa642f6e.aspx which would help me
to do the custom rendering except for the fact that I cant install the
http://go.microsoft.com/fwlink/?LinkId=6350 file.
This issue is very important to this project. I hope we can find some
solution.
Thanks
Steven Cheng[MSFT] - 04 Apr 2006 09:44 GMT
Thanks for your followup kapilp,
As for the mobile toolkit's issue, it is caused by the toolkit is shipped
with framework 1.0 oringally, after that it becomes part of the framework
base class library. So we need to install .net framework 1.0 so as to
install that toolkit. I've tried it and it works(with the adapter's source
code installed).
Hope this helps.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
kapilp - 04 Apr 2006 17:01 GMT
The code is different from version 1.0 to 2.0. i am using asp.net 2.0 in
visual studio 2005. if i implement the old code then i will be losing out on
features and probibly create more bugs.
i dont want to start developing in 1.0 now.
what is the solution for this issue in asp.net 2.0?
Steven Cheng[MSFT] - 05 Apr 2006 11:36 GMT
Hi kapilp,
The code is the referenced code, you can just copy the certain adapter's
code out and compile it in your own 2.0 class library project. That doesn't
mean we have to use 1.0 framework. After you create your own custom
adapater for a certain built-in control, you can update the adapter
mappings which is defined in web.config. And the default setting is in the
global web.config(under .net framework system folder ):
#Adapter Mappings
http://msdn.microsoft.com/library/en-us/mwsdk/html/mwconadaptermappings.asp?
frame=true
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
kapilp - 03 Apr 2006 17:51 GMT
Also, is there anyway I might be able to postback when I click on the image
control because the image controls and link controls do render correctly.
I tried to manually run the doPostBack() function and make asp.net think I
was click on the command button when I was actually clicking on the image
link. This worked on IE but fails in the WAP browser probibly because there
is no support for javascript in the WAP browser.
Any ideas on this?