ASP.NET Server Controls in BlackBerry Browser

ASP.NET Server Controls require JavaScript to be enabled in the BlackBerry browser to work properly. Controls like asp:DropDownList, asp:LinkButton etc., may require JavaScript for Postback. These controls has Postback property, which will post the data back to the server.

These controls won’t work properly especially in BlackBerry browsers, if you didn’t enable the Javascript, in the web.config file.

One strange scenario, where some of the  ASP.NET  controls won’t work are – If you use Mobile Device Browser Files(.browser) files to detect the Mobile browsers.

To overcome this problem, add the following code in the web.config in section.

       
         
     <System.web> <browserCaps> <filter> <case match=”(?i)BlackBerry”>EcmaScriptVersion=1.5</case> </filter></browserCaps></System.web>
         
       

Happy Web programming for BlackBerry!!!

Testing ASP.NET Web Application in iPhone Simulator available in Safari browser

Once the web application development is done, next task is to test the asp.net web application in different Mobile devices. Now we will see how to test our asp.net web application in iPhone using Safari Browser.

Install the Safari Web browser. Safari web browser is freely available, and you can download it from the below link.

http://www.apple.com/safari/download/

Now launch the Safari browser. By default, the Menu Bar will be hidden. Enable the menu bar, by selecting Settings->Show Menu Bar, as shown in the below figure.

                                            show menu bar

Now again select Settings –> Preferences… option as shown in the below figure.

                                              preferences

It will invoke the Preferences dialog. In this dialog, select Advanced tab and check the option “Show Develop menu in menu bar”, as shown in the below figure.

                                           developer option

Close the Preferences dialog. Now Develop menu will be available in the menu bar.

Select the Develop—>User Agent –>Mobile Safari 4.0.2 – iPhone option as shown in the below figure. Now the displayed website will be as it displayed in the iPhone.

User agent - iphone

Check the below figure, how the Citibank Mobile site is displayed in the Safari browser.

                                                           citi Mobile

 

NOTE: You can test your web application in iPad mode by selecting iPad option from the User Agents.

You are done. Happy Testing!!!

Developing Web Applications for BlackBerry Mobiles using Microsoft ASP.NET

Let us see, how to develop a Web application for Blackberry device. Now a days Mobile device plays a  prominent role in our life.

Developing Web applications for mobile devices are made simple with introduction of Microsoft ASP.NET. The main advantage of developing web application using ASP.NET is, it renders the content based on the requested device. Another advantage is, the webpage which is designed to render on Desktop browsers, works perfectly in Mobile browser also.  By just adding some meta tags, web pages display perfectly fine in Mobile browsers.

Microsoft provides two powerful IDE’s for developing Web applications – Visual Studio 2008/ 2010 and Expression Web.

Three major steps in developing Mobile web applications are:

  1. Designing the web page.
  2. Adding necessary meta  tags for display in Mobile devices
  3. Finally, testing the web application using Emulators.

Designing the web page:

Designing of webpage should be done, such that it should be compatible & fit for both Desktop & Mobile browsers. While designing web applications for Mobile devices, avoid web pages with large images, Flash Ads(Some Mobile browsers won’t support Flash. Ex:Apple iPhone etc.,). Web page should be light and very powerful and user friendly. Don’t make it clumsy by adding unnecessary images /text.

NOTE: BlackBerry browser won’t display images more than 1 MB of size. So prefer choosing .PNG images .

Some ASP.NET controls like asp:LinkButton,asp:dropDownList controls won’t work in BlackBerry browsers. To resolve this issue, add the following code under <system.web> section in the web.config file.

<browserCaps>

<filter>

<case match=”(?i)BlackBerry”>EcmaScriptVersion=1.5</case>

</filter>

</browserCaps>

Adding necessary META tags for display in Mobile devices

Two META tags which makes the web page compatible with Blackberry browsers.

<meta name=”HandheldFriendly” content=”true” />

<meta name=”viewport” content=”width=device-width,height=device-height, initial-scale=0.5, maximum-scale=1.0;” />

Finally, testing the web application using Emulators

Now we need to test our web application in BlackBerry browser. RIM provides an excellent tool for testing web application in BlackBerry browser – BlackBerry Plugin 2.5 for VS 2008. Download it and install on your computer.

BlackBerry Plugin 2.5 is bundled with three emulators – BlackBerry Bold 9700, BlackBerry Storm 9550 and BlackBerry Torch 9800.

NOTE: Before installing make sure that JDK 1.6 is installed in your machine, it is prerequisite for installing BlackBerry Plugin 2.5. And also note that the plugin in compatible with Visual Studio 2008 only.

Once the BlackBerry plugin 2.5 is installed, we are ready to test our web application. To test the web application in BlackBerry browser follow the steps below.

  • Launch VS 2008. Open the Website.
  • From the BlackBerry toolbar select the emulator.

emulator_selection

  • In Solutions Explorer, right click on the web page, which needs to be viewed in BlackBerry browser.

rightclick

  • Select Browse with option in the context menu.

select

  • It will invoke Browse with dialog. Now select BlackBerry and click on Browse button.

bb

  • It will launch BlackBerry emulator with the web page.

image

NOTE: You can set the BlackBerry emulator as the default browser to view the Web Pages, by clicking on Set as Default in the  Browse with dialog.

Latest Browser Configuration Files

 

Everyone would have been scratching their heads for developing Mobile websites. Some may think it is hectic task for developing Mobile websites. With the introduction of  Microsoft ASP.NET, developing websites for Mobiles devices are made simple.

Two major problems for web developers are based on requested device, redirecting users to the Mobile site or General Site. And, fetching the Browser capabilities.

Both the problems are solved by downloading the latest Browser Configuration files(.browser). Check the following link, to download the latest browser configuration files.

http://stephenwalther.com/blog/archive/2010/03/05/use-asp.net-4-browser-definitions-with-asp.net-3.5.aspx

Once you are done with downloading the Browser Configuration files, copy those file to the App_Browsers directory in your application.

 image

NOTE: Don’t copy the Default.browser file. Since it is already available in the System.

Now, You are done. Happy Coding…!

Mobile Development in ASP.NET

I wonder, how easy it is to develop Mobile Web applications using ASP.NET. The beauty of asp.net is, it automatically renders the content based on the requested device. General asp.net code intended to work with desktop browsers like Microsoft Internet Explorer,Mozilla Firefox etc., works absolutely fine in Mobile browsers also. It saves lot of time, without writing separate code for Mobile version of web applications.

NOTE: Mobile Web browsers should be HTML compatible in order to display asp.net web page.

For developing Web applications, which intended for Apple iPhone, with minor additions to the existing page, it will render absolutely fine in the Apple safari [Mobile Browser]. Check the below link for more info.

http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariWebContent/Introduction/Introduction.html#//apple_ref/doc/uid/TP40002051

For developing Web applications, which intended for BlackBerry Mobile Phones, surprisingly BlackBerry provides Visual Studio plug-in for BlackBerry, to develop web applications for BlackBerry. Check the following link for more info.

http://na.blackberry.com/eng/developers/browserdev/

For Mobile web application, intended to display in Android/Symbian OS, it renders absolutely fine, without any extra additions to the page.

If you want to redirect the user to the Mobile Version website, based on the request, check the following link for more information.

http://mdbf.codeplex.com/

My Experience with Microsoft.NET

I’m novice developer in .NET. I use to develop web applications in JAVA since two years. Recently, started exploring .NET and found many interesting things, which I would like to share with you all.

Microsoft .NET, is the technology platform which everyone has to experience it. One of the .NET programming languages, I would like to share my experience is, developing ASP.NET web applications with C#.

Let me start with the beauty of Visual studio 2008 IDE (Integrated Development Environment). It’s an excellent tool for developing ASP.NET web application. Though Microsoft Expression Blend & Web is available for rapid web application development, I prefer using Visual Studio. It’s an awesome tool for developing web applications, right from designing the web application to deploying the web application.

I’m very much impressed with the tools & built in controls available for developing ASP.NET web applications. Frankly speaking, I had a Mobile Web application which was developed using JSP & Struts. I started writing the code for the same application in ASP.NET and interestingly finished my application in half of the time which the JAVA application is developed. Wow its amazing right.

AJAX (Asynchronous JavaScript and XML). It’s very powerful, for partial updating of a webpage. ASP.NET supports AJAX in its own style. Developing ASP.NET AJAX web application is as simple as ordering a cake. Everything is readily available, you just need to know how and when to use it.

When I started exploring ASP.NET AJAX, I enjoyed a lot with exploring features in that. There is lot of difference in the way of programming for AJAX, with ASP.NET and JAVA. Believe me it’s fun to develop ASP.NET AJAX web applications.

Next, the most exciting feature in .NET is Interoperability, which it helped me a lot. We have already developed Core engine level functionality in C language. By taking advantage of Interoperability feature in .NET, we have finished our project in no matter of time. Hats off to Microsoft Team for integrating an awesome feature in .NET.

Though I’m developing Microsoft .NET applications since six months, I learn something new every day when I start programming in .NET. It’s an awesome experience with Microsoft.NET.

I started exploring WPF (Windows Presentation Foundation), which is dedicated for developing Windows application with enhanced GUI. i really enjoying exploring WPF.

Finally, I’m satisfied with the environment provided for developing applications in Microsoft .NET platform. Hope you guys also enjoy it…!