Visit the BlackBerry ASP.Net browser

I have a small little page that will be viewed from BB. Here are my 2 questions:

  • If I "click" on the link to submit the page, I get the following error: "JavaScript: An error occurred while executing the script". I can tell my BB is for Microsoft IE browser emulation and I am not getting this error. I hope not to use this option because I doubt my users will be able to figure it out.

  • I have a panel that has a textbox and a button. I am setting the panel's DefaultButton property to be a button, so when someone presses the enter button, it fires the button click event. When I hit Enter on my BB it reloads the page. Does anyone know why and how to fix this?

thank

+1


source to share


1 answer


The javascript support is not very good on blackberries, especially BBs running old software.

For # 1, your site outputs two different sets of HTML. Setting the browser type to only blackberry doesn't affect its rendering engine at all, it just sends a different header which makes asp.net think the client is running IE, and there another html / javascript is sent for it there.



For # 2, I don't think BB is going to do what you want. It submits the form but does not set the target correctly. It may be easier to move the form processing logic to Page_Load inside the isPostback if statement. this way, no matter how the form is submitted, your code will work.

Both cases can be fixed by providing more details on the Blackberry browser for asp.net. Here is an article that describes how to make a .browser file so that asp.net knows what type of HTML and JavaScript should be sent to the device.

+2


source







All Articles