Skip to main content

Posts

Showing posts from January, 2012

How to set column width and height a CheckBoxList in an ASP.NET?

There is always common problem for CheckBoxList control that it doesn't have set of column width and row height. The problem is that since I can't seem to figure out how to set the width of the individual cells, which means the columns in each list don't match up with the other lists, and the design doesn't look clean. Below image there is two checkbox list control and each contain 3 columns Set the RepeatColumns to 3 To solve we are create style sheets . And w e need to set the same height and width properties in the class and apply that class to both the CheckBoxList control. e.g < style type ="text/css"> .chkBoxList tr { height : 25px ; } .chkBoxList td { width : 150px ; } </ style > < asp : CheckBoxList ID ="CheckBoxList1" runat ="server" RepeatColumns ="3" CssClass ="chkBoxList"> < / asp : Che

What is the difference between Pre-Render and Render events in ASP.NET Page?

Pre Render “ This event used for modifying server controls just before sending them down to the client” Allows final changes to the page or its control. This event takes place after all regular PostBack events have taken place. This event takes place before saving ViewState, so any changes made here are saved. For example : After this event, you cannot change any property of a button or change any viewstate value. Because, after this event, SaveStateComplete and Render events are called. Render “This event is used to put the HTML output to the response stream” This is a method of the page object and its controls (and not an event). At this point, ASP.NET calls this method on each of the page’s controls to get its output. The Render method generates the client-side HTML, Dynamic Hypertext Markup Language (DHTML), and script that are necessary to properly display a control at the browser. For more ASP.NET page life cycle Click Here…

What is a satellite assembly?

Satellite assemblies are used to build multi-linguistic applications. Application which has built in supportive of more than one human readable language is known as multi-linguistic applications. • Satellite Assemblies doesn’t contain any Data. • Satellite assembly is containing cultural information . • Satellite assembly mainly used for to display information based on the Cultural setting of browser or region. Suppose you developed your application in an English (en-US) locale. Now, your application has multilingual support. When you deploy your code in different location, for example in India, you want to show text, label messages in the national language (local language) which is other than English. Satellite assemblies give this flexibility. You create any simple text file with translated strings, create resources, and put them into the bin\debug folder. That's it. The next time, your code will read the CurrentCulture property of the current thread and accordingly l

How can I use a image background in WPF?

To set an image as background of WPF Browser page, we can set an image as the Background of the Page and Grid. The following code snippet sets the background of a Grid to an image. Also we can set the opacity of the image. < Page x : Class ="WPF.PageBackgroundImage" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns : x ="http://schemas.microsoft.com/winfx/2006/xaml" Title ="Page Backround" Width ="325" Height ="208"> < Page.Background > < ImageBrush ImageSource ="Image/Water lilies.jpg" Opacity ="0.2"/> </ Page.Background > < Grid > < TextBlock Margin ="16,78,0,58"> Image are set in background of Page in WPF </ TextBlock > </ Grid > </ Page > Output

ASP.NET Menu Control Cannot Work in Google Chrome browser ?

I am using asp.net menu control which is not working in Google chrome although it is working fine in Firefox and IE. Here I used the ASP.NET Control Which Contain the 5 Main Menu and 5 Sub menu as Following < asp : Menu ID ="Menu1" runat ="server" Orientation ="Horizontal" style =" margin-top : 15px"> < Items > < asp : MenuItem Text ="Menu 1" Value ="Menu 1"> < asp : MenuItem Text ="Sub Menu 1" Value ="Sub Menu 1"> </ asp : MenuItem > < asp : MenuItem Text ="Sub Menu 2" Value ="Sub Menu 2"> </ asp : MenuItem > </ asp : MenuItem > < asp : MenuItem Text ="Menu 2" Value ="Menu 2"> </ asp : MenuItem > < asp : MenuItem Text ="Menu 3" Value ="Menu 3"