09-12-2008 04:03 PM
Hey Web Development,
I'm having an issue with the BlackBerry browser posting back to the server. I'm testing using the BB 4.2.0, BB 4.2.1, and BB 4.2.2 devices with MDS versions 4.1.2 and 4.1.4 which are both behaving similarly for my purposes.
With MDS, the device is able to initially load my aspx page. However, submit forms only work the 4.2.0 Device Simulator Blackberry Browser on a BB 8100 and not on a 4.2.1 Device Browser, nor the 4.2.2 Device Browser.
As for the ASP.NET aspx page, efforts have been made to ensure that no javascript is loaded on the client side and no tables, CSS, etc, is required. See the ASP.NET HTML output below.
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-m
obile12.dtd"><!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona l.dtd"> --><html xmlns="http://www.w3.org/1999/xhtml"> <head><title> Mobile Donate</title><link rel="stylesheet" media="screen" type="text/css" href="simple.css" /></head> <body> <form name="aspnetForm" method="post" action="MobileDonate.aspx?EventID=9054&LangPre f=en-CA" id="aspnetForm"><div><input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTEwNzgxMDcyNg8WBh4HRXZlbnRJRALeRh4 MTGFuZ3VhZ2VDb2RlBQVlbi1DQR4OUmVnaXN0cmF0aW9uSURmF gJmD2QWAgIDD2QWAgIBD2QWWAIBD2QWAgIBDxYCHgRUZXh0BQ9 NYWtlIGEgRG9uYXRpb25kAgUPZBYCAgEPFgIfAwUkVGhhbmsge W91IGZvciB5b3VyIGdlbmVyb3VzIHN1cHBvcnQuZAILDxYCHwM FFFBlcnNvbmFsIEluZm9ybWF0aW9uZAINDw8WAh4MRXJyb3JNZ XNzYWdlBRxGaXJzdCBOYW1lIGlzIHJlcXVpcmVkPGJyIC8+ZGQ CDw8PFgIfBAUbTGFzdCBOYW1lIGlzIHJlcXVpcmVkPGJyIC8+Z GQCEQ8PFgIfBAU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Aq7Rg9kCArbRw9oCArbRz9oCArbRy9oCAoGo2OUKAomo2 OUKAoGo9OUKAp6omOYKAp6olOYKAp6okOYKAp6orOYKAp6oqOY KAp6opOYKAvKaq/YCArHE9KsEm786/Nrix/HgqrIkYw602SEWl Xw=" /></div> <div> <div id="ctl00_body_divTitle"> Make a Donation</div> <div id="ctl00_body_divSubTitle"> </div> <div id="ctl00_body_divDesc"> Thank you for your generous support.</div> <br /> <input type="image" name="ctl00$body$btnSubmit" id="ctl00_body_btnSubmit" src="images/hiddenSubmitPixel.gif" style="border-width:0px;" /><br /> <br /> <br /> <b> Personal Information</b> <hr /> <br /> <b> First Name: </b> <input name="ctl00$body$txtFirstName" type="text" size="15" id="ctl00_body_txtFirstName" /><span id="ctl00_body_labelFirstNameRequired" class="req">*</span><br /> <b> Last Name: </b><input name="ctl00$body$txtLastName" type="text" size="15" id="ctl00_body_txtLastName" /><span id="ctl00_body_labelLastNameRequired" class="req">*</span><br /> <br /> <b> Address Line 1: </b><input name="ctl00$body$txtAddrLine1" type="text" size="15" id="ctl00_body_txtAddrLine1" /><span id="ctl00_body_labelAddrLine1Required" class="req">*</span><br /> <b> Address Line 2: </b><input name="ctl00$body$txtAddrLine2" type="text" size="15" id="ctl00_body_txtAddrLine2" /><br /> <b> City: </b> <input name="ctl00$body$txtCity" type="text" size="10" id="ctl00_body_txtCity" /> <span id="ctl00_body_labelCityRequired" class="req">*</span><br /> <b> Province/State: </b><select name="ctl00$body$ddlProvince" id="ctl00_body_ddlProvince"> <option value="AB">Alberta</option> <option value="BC">British Columbia</option> <option value="MB">Manitoba</option> <option value="NB">New Brunswick</option> <option value="NL">Newfoundland and Labrador</option> <option value="NT">Northwest Territories</option> <option value="NS">Nova Scotia</option> <option value="NU">Nunavut</option> <option selected="selected" value="ON">Ontario</option> <option value="PE">Prince Edward Island</option> <option value="QC">Quebec</option> <option value="SK">Saskatchewan</option> <option value="YT">Yukon</option></select> <span id="ctl00_body_labelProvinceRequired" class="req">*</span><br /> <b> Postal/Zip Code: </b><input name="ctl00$body$txtPostalCode" type="text" maxlength="7" size="7" id="ctl00_body_txtPostalCode" /><span id="ctl00_body_labelPostalCodeRequired" class="req">*</span><br /> <b> Country: </b>CANADA <input type="submit" name="ctl00$body$btnChange" value="Change" id="ctl00_body_btnChange" /><br /> <br /> <b> Phone: </b> <input name="ctl00$body$txtAreaCode" type="text" size="4" id="ctl00_body_txtAreaCode" /> <input name="ctl00$body$txtTelephoneNumber" type="text" size="15" id="ctl00_body_txtTelephoneNumber" /><span id="ctl00_body_labelPhoneNumberRequired" class="req">*</span><br /> <b> Email: </b><input name="ctl00$body$txtEmail" type="text" id="ctl00_body_txtEmail" /><span id="ctl00_body_labelEmailRequired" class="req">*</span><br /> <br /> <br /> <b> Payment Information</b> <hr /> <div> <!-- Payment Methods Panel --> <div id="ctl00_body_ucMobilePayments_panelPaymentMethod s"> <label for="ctl00_body_ucMobilePayments_ddlPaymentMethods "> Payment Method: <br /> </label> <select name="ctl00$body$ucMobilePayments$ddlPaymentMethod s" id="ctl00_body_ucMobilePayments_ddlPaymentMethods" > <option selected="selected" value="One Time Credit Card">Single Credit Card Donation</option> <option value="Monthly Credit Card">Monthly Credit Card Donation</option> </select> </div> <br /> <label for="ctl00_body_ucMobilePayments_txtAmount"> Donation Amount: </label> <input name="ctl00$body$ucMobilePayments$txtAmount" type="text" size="6" id="ctl00_body_ucMobilePayments_txtAmount" /><span id="ctl00_body_ucMobilePayments_labelAmountRequire d" class="req">*</span> <!-- Gift Aid Panel --> <div id="ctl00_body_ucMobilePayments_panelGiftAid"></di v> <!-- Credit Card Panel --> <div id="ctl00_body_ucMobilePayments_panelCreditCard"> <div id="divCreditCardType"> <label for="ctl00_body_ucMobilePayments_ddlCreditCardType 0"> Card Type: </label> <select name="ctl00$body$ucMobilePayments$ddlCreditCardTyp e0" id="ctl00_body_ucMobilePayments_ddlCreditCardType0 "> <option value="Amex">American Express</option> <option value="MasterCard">MasterCard</option> <option selected="selected" value="Visa">Visa</option> </select> <span id="ctl00_body_ucMobilePayments_labelCreditCardReq uired" class="req">*</span> </div> <!-- Credit Card Number Entry --> <div id="ctl00_body_ucMobilePayments_divCreditCardNumbe r"> <label for="ctl00_body_ucMobilePayments_txtCreditCardNumb er"> Card Number: </label> <input name="ctl00$body$ucMobilePayments$txtCreditCardNum ber" type="text" maxlength="24" size="20" id="ctl00_body_ucMobilePayments_txtCreditCardNumbe r" /><span id="ctl00_body_ucMobilePayments_labelCreditCardNum berRequired" class="req">*</span> <div id="ctl00_body_ucMobilePayments_divCreditCardVerif ication"> <label for="ctl00_body_ucMobilePayments_txtCreditCardVeri fication"> CVV: </label> <input name="ctl00$body$ucMobilePayments$txtCreditCardVer ification" type="text" maxlength="4" size="4" id="ctl00_body_ucMobilePayments_txtCreditCardVerif ication" /><span id="ctl00_body_ucMobilePayments_labelCreditCardVer ificationRequired" class="req">*</span> <div id="creditCardVerificationInfo"> </div> </div> <!-- Card Holder Name --> <div id="divCardHolderName"> <label for="ctl00_body_ucMobilePayments_txtCardHolderName "> Card Holder: </label> <input name="ctl00$body$ucMobilePayments$txtCardHolderNam e" type="text" maxlength="255" size="20" id="ctl00_body_ucMobilePayments_txtCardHolderName" /> <span id="ctl00_body_ucMobilePayments_labelCardHolderNam eRequired" class="req">*</span> </div> <!-- Expiry Date --> <div id="divCardExpiration"> <label for="ctl00_body_ucMobilePayments_ddlCreditCardExpi ryMonth"> Expiry Date: </label> <br /> <label for="ctl00_body_ucMobilePayments_ddlCreditCardExpi ryMonth"> Month </label> <select name="ctl00$body$ucMobilePayments$ddlCreditCardExp iryMonth" id="ctl00_body_ucMobilePayments_ddlCreditCardExpir yMonth"> <option value="0"></option> <option value="1">01</option> <option value="2">02</option> <option value="3">03</option> <option value="4">04</option> <option value="5">05</option> <option value="6">06</option> <option value="7">07</option> <option value="8">08</option> <option value="9">09</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> </select> <label for="ctl00_body_ucMobilePayments_ddlCreditCardExpi ryYear"> Year </label> <select name="ctl00$body$ucMobilePayments$ddlCreditCardExp iryYear" id="ctl00_body_ucMobilePayments_ddlCreditCardExpir yYear"> <option value="0"></option> <option value="8">08</option> <option value="09">09</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> </select> <span id="ctl00_body_ucMobilePayments_labelExpireDateReq uired" class="req">*</span> </div> </div> </div> <!-- <div id="divVerisignSeal"> </div> --></div> <br /> <br /> <input type="submit" name="ctl00$body$btnContinue" value="Continue" id="ctl00_body_btnContinue" /> <input type="submit" name="ctl00$body$btnCancel" value="Cancel" id="ctl00_body_btnCancel" /> </div> </form> </body></html>
I tried a static HTML page with viewstate commented out and the browser was to post. However, with the viewstate in the HTML, the browser never submits (and no MDS activity is shown in the MDS command window).
Oddly, the HTML page code above submits with a BB 4.2.0 Device Simulator.
Additional Info:
I'm running ASP.NET 3.5 on Visual Studio 2008, and not using the Mobile Adaptor Architecture, just basic ASP.NET postbacks with ViewState enabled. The browsers configurations are defaulted to use no Javascript.
Any thoughts?
09-12-2008 07:31 PM
hello,
you webpage is basically a < form > that points (POST mode) to the MobileDonate.aspx file.
inside that < form >, there are two < input > fields that are too long :
09-15-2008 09:49 AM
Thanks for your reply Xandrex, but could you tell me how I can learn more about Blackberry Browser form parameter lengths?
I ask because
are standard hidden values generated automatically by viewstate-enabled ASP.NET pages. Does this mean that the BlackBerry browser cannot postback to pages with ASP.NET viewstates? This is a significant limitation to the browser as the VIEWSTATE is an essential approach ASP.NET technology.
Also, do you know of a work around or if there is a fix?
I could remove VIEWSTATE but that would require a significant recoding effort. Does anyone know if the adaptive architecture resolves this problem?
09-15-2008 11:54 AM
Please ensure that you have configured your environment for BlackBerry Browser support.
How To - Configure .NET 2.0 for BlackBerry Browser support
How to - Use the ASP.NET Device Profiling Tool to Create BlackBerry device profiles
Article Number: DB-00520
09-15-2008 01:24 PM
Mark,
thanks for your reply.
I am somewhat confused, though. Are you saying that I need to use the Adaptive Control Architecture
and also force all BB users of my pages to change their default BB browser settings? The reason this
page was designed in bare-bones ASP.NET HTML is so that we could accomodate BB users that did
not know how to change their BB browser settings.
Also, does using the adaptive control architecture change the page's __VIEWSTATE length or allow
the BB to post longer the __VIEWSTATE (assuming that is the problem)?
Perhaps you could confirm if the Browser's __VIEWSTATE length is the actual problem.
AL
09-15-2008 07:26 PM
Hello,
alau wrote:
Perhaps you could confirm if the Browser's __VIEWSTATE length is the actual problem.
09-16-2008 10:45 AM
After waiting for my CPU to come back trying to render this forum html, and after watching flash animation
on hotmail when what I really wanted was some of my own CPU to be doing something useful, I'm left
asking you why you need all this "stuff" in your simple webpage? I'm not sure this is very satisfactory
and maybe the BB "should" support a 4k blob but you realize of course that EDGE and 3G are still
somewhat BW limited and even if it "should" support this waste, what is it you hope to accomplish
that you couldn't do with a better design?
Thanks.
09-16-2008 11:07 AM
Marchywka,
Thanks for your comment. I have started looking into removing the viewstate.
I understand that ASP.NET Viewstate are a fundamental component of the ASP.NET technology that make it easier to maintain state changes between post backs. Not to say that this page can't be designed better, more simpler, or more condensed, but knowing the limitations of the browser is what I'm after.
If it's conclusive that the Viewstate is too large, then, it would make sense to redesign this page (and all the others) without viewstate. This page was first designed with default functionality in mind (no Javascript, no CSS, no tables, no images) so that the page size would be minimal (10K) and would work on all BB browser default settings. However, I've discovered that on some BB browsers, this page would not post.
So, I'm wondering if it's the viewstate. Or, perhaps is it something else?
Thanks.
09-16-2008 11:13 AM
i'm not sure why your viewstate has to be so big. You can disable viewstate control by control - so if you think viewstate is probably a bad design - I'm guessing you probably don't need much of it! If you go through the properties on each control on your form, you can turn it off.
There is also a page debug mode that tells you how much viewstate bytes each control is using.
The alternative to viewstate is to use session memory or database space - I'm not thinking you're looking for that discussion ![]()
09-16-2008 11:14 AM