0

Hi All,
We can use Command name and argument for web controls such as imagbutton or button etc..
But Can we use Command name and argument for html tags such as(span,a)?

It's urgent.
Please put some light on it..
Thanks

2
Contributors
4
Replies
18
Views
4 Years
Discussion Span
Last Post by RvSon
1

If you add the runat="server" to the HTML elements, you can access them in your code behind. That doesn't mean you will have access to methods and properties for those elements.

For example on the span element, you'd be able to access the innerHTML property.

0

Hi JorgeM,
First of all thanks for your answer.
You are totally right but i want to use Properties too. i have tried with converting HTML tag into aspx but it didn't work for me.
If you have any better suggestion please let me know.

1

So, i dont beleive that you can do this with HTML controls. Why not use a <asp:label /> control in place of a <span> element. They will both render as <span> elements in the browser... However, i am not really clear on what you are trying to do... With regard to the button, imagebutton, linkbutton, there are command name and arguments because it makes sense on that type of control. You could use one control and do different things within the event based on the parameter you pass. I dont see how that will be of any use on a span element.

Edited by JorgeM

0

Yes jorgeM
You are right, i have to use aspx controls only. just i wanted to know is there any way to do with html tags. i have tried many things but didn't get it properly.. anyways thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.