Monday, 22 April 2013

Written By:- Isha Malhotra(malhotra.isha3388@gmail.com)
If you find this article useful then leave your comment

Themes in Asp.net

Sometimes we need to change the layout of application for
different-different user. For example if a single application is used by
different-different client and every client has his own color schema, logo,
font etc. requirements then we use themes

A theme is a collection of skin files, css, graphics, images
etc.

Add Theme

To add theme we have to first create the theme folder using
name App_Themes.

In my last article
I discussed how we create event for control which we generate at runtime. In this
article I am discussing how to create a single event for multiple controls and
how we access all control through single even.

Just remember
the example for searching where a list is showing with alphabet and on which
alphabet we click the list generated according to it.

Friday, 29 March 2013

In my last article I discussed how to create control atruntime. Now I am discussing that if we want to make any event on any control
then how we generate. To understand the concept of event you must have the
knowledge of Delegate

For Example:-

In my Last Artical I create simple program of two number sum
where I created control at run time. I am continuing with same example in which
now I am creating event for button click and performing sum operation on that
controls which we generated at runtime.

In this article I also explain how to access the runtime
generated control.

To add event in the button I have to use the delegate
EventHandler and add it in the click event and pass the reference of method to
the EventHandler which will fire when we click on the button.

Create following method (you can say it event for button
click)

protectedvoid btn_Click(object sender, EventArgs
e)

{

}

Now we have to pass the reference of this method to that
button which we create at runtime. We have to add this reference to the event
handler.