What is use Of runat="server"????

Posted by Sabarimahesh under C# on 3/22/2012 | Points: 10 | Views : 4880 | Status : [Member] | Replies : 10
Clear Answer
What is it?????
How is it??????
Where is the Main Difference???????

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M



Responses

Posted by: Patel28rajendra on: 3/22/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

It means that control will executed at server side and all its events will be executed at server side

R D Patel

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/22/2012 [Member] Bronze | Points: 25

Up
0
Down
i agree with Patel28rajendra.

runat="server" also can be used with html controls.

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Savariya on: 3/22/2012 [Member] Starter | Points: 25

Up
0
Down
it means that your execution take place at server side you can set this to HTML Controls also which you want to run at server



Thanks

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/23/2012 [Member] Bronze | Points: 25

Up
0
Down
Rajni.Shekhar ,Savariya ,Patel28rajendra:

i also agree with Patel28rajendra.

If i'm type the Sourcecode with runat="server"

like this :<asp:Label ID="Label1" Text="Label"></asp:Label>


Wat is the Reflection ??????

Any Error Will occur........

That Control Will Not executed in site....


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajni.Shekhar on: 3/23/2012 [Member] Bronze | Points: 25

Up
0
Down
It will show an error on design page like : "Error Creating Control" "No 'runat=server' attribute present on the label"
Label control will not be shown to design page even at run time.

Because ASP:Label is a server side control by deafault if you want a client side control you have to take HTML controls for that.

Thanks,
Rajni Shekhar

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/23/2012 [Member] Starter | Points: 25

Up
0
Down
Hi

yes it will not display on page when running but it will give error in design view as Rajni Shekhar said.


Mark as Answer if it is solved
Thanks


R D Patel

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/23/2012 [Member] Bronze | Points: 25

Up
0
Down

TO Patel28rajendra
YES MAN

Error : 'Label1' does not exist in the current context




Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/23/2012 [Member] Bronze | Points: 25

Up
0
Down
Rajni.Shekhar


YA I KNOW...

THIS DISCUSSION TO LEARN MORE
THATS Y .. I'M ASKING AND ASKING

DONT MIND ANYTHING


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patel28rajendra on: 3/23/2012 [Member] Starter | Points: 25

Up
0
Down
Ok

noproblem

R D Patel

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/23/2012 [Member] Bronze | Points: 25

Up
0
Down

To
Patel28rajendra
Rajni.Shekhar

Stay Long With Dotnetfunda...

To share and discuss More

Guys

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Sabarimahesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response