Hello,
Glad you got it working. Unlike in ASP.NET Webform TextBox controls, we can't directly use AutoPostBack features in mobile TextBoxes to cause a postback to the
server when you change text in the textBox. This is because some devices/browsers do not support javascript which the webform autopostback
makes use of. Thus in order to cause a postback to the server so that your code executes, you will need to explicitly user the command button the way that you are
currently using.
Thanks.
Regards,
Sachin Goregaoker
Microsoft Developer Support
This posting is provided "AS IS" with no warranties,
and confers no rights.
--------------------
| GOT IT.........
|
| Looks like I was trying to do too much on one screen. The
| coment I made in the last post 'Its almost as if the
| phone isn't quite sure where the Find button is located'
| seems quite true.
|
| Originally I had
|
| TEXTBOX
| COMMAND
| LIST
|
| all on one form, as soon as I moved the list into a form
| of its own, the command button works a treat, it isn't
| displayed anywhere except as the softkey. (Previously it
| was showing as a softkey on one page and <FIND> on the
| subsequent page. I'm still finding that textboxes either
| dont instantiate a proper postback or the contents are
| not accesible on the postback hence why I still have to
| resort to a command button. By Design?
|
| Does anyone happen to know where I can find a good
| Motorola emulator as this project is costing loads in
| mobile pay as you go airtime. I have checked the ones
| detailed on the ASP.NET site but they seem more like
| advanced PDA type emulators not just for basic phones.
|
| Thanks Pete.
| >-----Original Message-----
| >Further update.
| >
| >As I mentioned in my other mail (anonymous - sorry about
| >that), the textbox doesn't seem to be executing its
| event
| >in the code behind, so I decided to add a command button
| >(with a softkey label of find) immediately after the
| >textbox with a list below that.
| >
| >BTW: You can look at the site at the following URL
| >
http://ssltesting.trinitycomputers.co.uk/mobile.
| >
| >For the product textbox just input '1' and in the
| >Customer textbox enter 'A'. If you have problems
| >accessing the site, I am probably trying an update to
| try
| >something else.
| >
| >
| >The window is a little like this:
| >
| >TEXTBOX ( I tried using both break after the text box
| and
| >the reverse.)
| >COMMAND
| >LIST
| >
| >I then transferred the on text change code to the
| command
| >button to populate the list.
| >
| >The idea being Populate the textbox, hit OK to end the
| >textbox input,hit the command buuton to perform the
| >search based on the text box and populate the list.
| >
| >In each case when the text box is displayed it is the
| >only item on the window, the softkey displays 'find' ?
| >dont understand why? but the find button is not
| >displayed. If you then populat the text box hit the find
| >softkey, a postback is made but doesn't seem to do
| >anything but the softkey now changes to OK. Hit the
| >softkey again and the screen shows <FIND> which I
| presume
| >is the command button and the Find event has fired as
| the
| >list is now populated.
| >
| >At this point the screen looks a little like this
| >
| ><FIND>
| >ListItem1
| >ListItem2
| >ListItem3
| >
| >If you move to any of the list elements both the
| softkeys
| >show 'OK' hit any of the softkeys and the item is
| >selected and processing continues - Lists work fine
| >
| >However if you scroll up to <Find> the 2 softkeys show
| GO
| >& FIND, hit the find softkey and the previous view of
| the
| >textbox is displayed in the state where the softkey
| shows
| >OK. Hit the GO softkey and it is as if the first item in
| >the list is selected and the software continues. Remeber
| >all these controls are on the same form. Its almost as
| if
| >the phone isn't quite sure where the Find button is
| >located, on the same view as the text box or on the view
| >with the list.
| >
| >Why in the previous step the softkey displayed FIND as
| it
| >displayed the text box I am unsure and the whole
| sequence
| >of events seem a little odd. Sorry to be so verbose but
| >this is really driving me nuts. Am I approaching this
| >whole thing wrong, as this is a tested device and the
| >browser version is 4.1.23 which is in advance of the
| >tested one 4.1.16.
| >
| >Any help would be greatly appreciated.
| >Pete.
| >
| >>-----Original Message-----
| >>OK I now have a Tested Device - namely a Motorola V50
| >>(bought specifically as it is on the tested list). It
| is
| >>definately behaving better but I am still having
| >problems.
| >>
| >>1. I have a 1 page with several forms.
| >>2. First form user selects a location code from a list
| >>and proceeds to the second form.
| >>
| >>private void LstLocation_ItemCommand(object sender,
| >>System.Web.UI.MobileControls.ListCommandEventArgs e)
| >>{
| >>if (e.ListItem != null)
| >>{
| >> Session["LocationCode"] = e.ListItem.Text;
| >> ActiveForm = frmProduct;
| >>}
| >>}
| >>
| >>THIS WORKS OK.
| >>
| >>3. On the second form I have a textbox which in the
| text
| >>changed event I populate a list etc. However when I hit
| >>the OK button on the phone, it just navigates back to
| >the
| >>first form and the list is unpopulated. This works OK
| in
| >>the emulator and also hitting the web site with IE6.
| Any
| >>ideas?
| >>
| >>private void txtProduct_TextChanged(object sender,
| >>System.EventArgs e)
| >>{
| >> RetrieveProducts();
| >> lstProducts.DataSource = ProductSQLDataReader;
| >> lstProducts.DataTextField = "ITEMNMBR";
| >> lstProducts.DataValueField = "QTY";
| >> lstProducts.DataBind();
| >>}
| >>
| >>Thanks, Pete.
| >>
| >>>-----Original Message-----
| >>>Hello Pete,
| >>>Thanks for your post. It could be specific to the
| >>particular device that you are using to test.
| >>>
| >>>Here is a list of the currently tested devices for
| >>Mobile Web Forms.
| >>>
| >>>
http://www.asp.net/mobile/testeddevices.aspx?tabindex=6
| >>>
| >>>Regards,
| >>>
| >>>Sachin Goregaoker
| >>>Microsoft Developer Support
| >>>
| >>>This posting is provided "AS IS" with no warranties,
| >>>and confers no rights.
| >>>--------------------
| >>>|
| >>>| OK, I managed to get my hands on another wap enabled
| >>>| mobile, a Siemens A55, postbacks worked and the
| >>>| navigation worked. Guess this could just be
| something
| >>>| specific to the nokia 3410?
| >>>|
| >>>| Pete.
| >>>| >-----Original Message-----
| >>>| >Further to my last mail - round trips dont seem to
| >>work
| >>>| >on the phone either. They do in the emulator.
| >>>| >
| >>>| >i.e. I had a mobile list, when the user selects an
| >>entry
| >>>| >in the list I display a next form link. As I select
| >>an
| >>>| >item in the list there is a postback and the phone
| >>>| >displays page not found.
| >>>| >
| >>>| >Pete.
| >>>| >>-----Original Message-----
| >>>| >>Further to my last post. If I have a default.aspx
| >>and
| >>>| in
| >>>| >>the page load event perform a Server.Transfer
| >>>| >>("page1.aspx") it works fine, but not from within
| a
| >>>| >>command buttons event handler.
| >>>| >>
| >>>| >>Pete.
| >>>| >>>-----Original Message-----
| >>>| >>>Hi All,
| >>>| >>>
| >>>| >>>I'm starting to have a look at ASP.NET web pages
| >>for
| >>>| >>>mobile devices. My first proof of concept project
| >>is a
| >>>| >>>simple app for a Nokia 3410 (our company mobile
| >>>| phones).
| >>>| >>>
| >>>| >>>I'm having a little trouble with navigating
| >between
| >>>| >>forms
| >>>| >>>and pages.
| >>>| >>>
| >>>| >>>A link that references another form on the same
| >>page
| >>>| >>>(#form2) works fine.
| >>>| >>>
| >>>| >>>A link that references another aspx page
| >>(page1.aspx)
| >>>| >>>doesnt work on the phone but does in Nokia's
| >mobile
| >>>| >>>browser tool (4.0).
| >>>| >>>
| >>>| >>>ActiveForm = form2 doesn't work on the phone but
| >>does
| >>>| >in
| >>>| >>>the browser tool.
| >>>| >>>
| >>>| >>>Server.Transfer("Page2.aspx") on the back of a
| >>button
| >>>| >>>doesn't work on the phone but does in the browser
| >>tool.
| >>>| >>>
| >>>| >>>When the above actions dont work on the phone, I
| >>just
| >>>| >>get
| >>>| >>>the message page not found.
| >>>| >>>
| >>>| >>>Any idea's or am I missing the point completely
| >>>| >>>
| >>>| >>>Thanks in advance,
| >>>| >>>
| >>>| >>>Pete.
| >>>| >>>.
| >>>| >>>
| >>>| >>.
| >>>| >>
| >>>| >.
| >>>| >
| >>>|
| >>>
| >>>
| >>>.
| >>>
| >>.
| >>
| >.
| >
|