Asp.net server controls in BlackBerry Browser
Hi All,
Some of the asp.net server controls(.NET 2.0) like DropDownList control, LinkButton etc., has postback property. When User clicks or selects these controls, a Postback will occur. Let us consider LinkButton control, which is extension of the HyperLink control. By Using Javascript, it provides us to execute some server side code, when user clicks on the LinkButton. Many web developers(especially developing Web applications for BlackBerry Web Browser) had come across situations like, LinkButton, DropDownList etc., is not working in BlackBerry web Browser.
To overcome this situation there is small work around for this. The below code matches the browser name from the Request object and set the ECMA(JavaScript) script version to 1.5, so that the BlackBerry Browser recognizes the javascript generated by the ASP.NET isapi filter.
Add the following code under <System.web> section.
<System.web>……………………..……………………<browserCaps> <filter> <case match="(?i)BlackBerry">EcmaScriptVersion=1.5</case> </filter></browserCaps></System.web>
NOTE: Though <browserCaps> section is deprecated in .Net 2.0, still you can use this.
Revision number 1, Monday, May 24, 2010 11:48:27 PM by roopeshreddy
You must Login to comment.
|
Tue, Jan 11, 2011 11:37 AM
by aspdotnetmonkey
|
Tried this and still doesn't seem to work in ASP.NET 4 using VS2010. This is tried using the BlackBerry Torch 9800 and the iPhone 4. What's happening is that on selected index change, the javascript for the dropdown list tries to redirect to the current page. It times out and the server-side code gets called with the Init event handler firing (I've seen it in debugging mode to see it hit the break points).
|