| Rafael del Corr...'s profile..:: Blog de Rafael del ...BlogLists | Help |
ContainersAs I said in the previous post, we are going to see each control specifically. The first of all controls there will be those that make possible to contain other controls: the “Forms” and the “Panels”. If we are accustomed to work with ASP.NET Desktop WebSites (standards ASP.NET pages) we know that a page can only contain one form control. And here there is a great advantage if we make it work properly: ASP.NET allows us to include more than one form in one page. If you bear in mind that a request from a mobile device it is expensive compare with a standard ASP.NET page request, the possibility of having two forms in one page, and being able to call one form at a time (writing “#” followed by the name of a form in a Link control in the Action property or through the ActiveForm property through the server code) will allow us to improve the quality (speed and cost) of our site. An other advantage of this functionality is that the variables continue existing between a call of a form to an other, since ASP.NET does not keep the variables state between different pages (ASP.NET standard). The functions and methods developed for the page are available for all forms. The problem with this functionality, is that if the page is plenty of forms, it will take more time to download it to the mobile device, and the page is reached by one URL, and this URL always point to the first form. This functionality is inherited from WML that works with “cards” instead of forms, but in the same way, to explain it quickly. There are some rules to work with the forms and the panels. They are: - A form can not contain another form. - A panel can not contain a form. - The panels are able to have one or more panels inside them. - A panel must exists inside a form, like any control. The forms, apart from having the common WMC´s properties and events, has their own. For now, we are going to see: Title Paginate Action ControlToPaginate PagerStyle-NextPageText or PagerStyle-PreviousPageText PagerStyle-PageLabel PagerStyle-StyleReference You can download an example from here. In the other hand, continue talking about “containers” we must name the “Panels”. This controls has not a visual interface, and its principal function is to group controls so that the developer can assign a certain value to a common property between the controls contained in the panel. Apart from having the common properties of the WMC´s, the panels has their own properties, and they are: Paginate StyleReference In the example that you can download above you can see how a panel can contain other controls. Try creating other controls inside a panel, changing a common property between them, and you will see how it changes for all of them. I hope that you find of your interest this article, and we are seeing in the next post, where I will continue talking about the ASP.NET Web Mobile Controls. Good Luck! TrackbacksThe trackback URL for this entry is: http://mobiledevp.spaces.live.com/blog/cns!B1F45CF18768D48A!119.trak Weblogs that reference this entry
|
|
|