Home All Groups Group Topic Archive Search About
Author
15 Feb 2005 3:17 AM
Maziar Aflatoun
Hi,

Does anyone know how I can add a css to the following link button. I want to
add it so that Update, Cancel and Edit have the css in the form of <a
href="" class="">Update</a>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update"
CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>

Thank you
Maz.

Author
15 Feb 2005 1:54 PM
Ken Cox [Microsoft MVP]
Hey Maz,

You need to create a style class and then assign it to the CssClass
property. Use a template column for this.

Does this help?

Ken
Microsoft MVP [ASP.NET]
Toronto

<style>
.myclass { font-size: 1.17em;
text-decoration: none;
color: #333399;
}
</style>

                    <asp:templatecolumn>
                        <itemtemplate>
                            <asp:linkbutton CssClass="myclass"
runat="server" Text="Edit" CommandName="Edit"
CausesValidation="false"></asp:linkbutton>
                        </itemtemplate>
                        <edititemtemplate>
                            <asp:linkbutton CssClass="myclass"
runat="server" Text="Update" CommandName="Update"></asp:linkbutton>&nbsp;
                            <asp:linkbutton  CssClass="myclass"
runat="server" Text="Cancel" CommandName="Cancel"
CausesValidation="false"></asp:linkbutton>
                        </edititemtemplate>
                    </asp:templatecolumn>


Show quoteHide quote
"Maziar Aflatoun" <ma***@rogers.com> wrote in message
news:n-WdnaN446xa9IzfRVn-og@rogers.com...
> Hi,
>
> Does anyone know how I can add a css to the following link button. I want
> to add it so that Update, Cancel and Edit have the css in the form of <a
> href="" class="">Update</a>
> <asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update"
> CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
>
> Thank you
> Maz.
>
>
Author
15 Feb 2005 5:58 PM
Maziar Aflatoun
Worked. Thanks
Maz.


Show quoteHide quote
"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
news:eBA4kX2EFHA.1924@TK2MSFTNGP14.phx.gbl...
> Hey Maz,
>
> You need to create a style class and then assign it to the CssClass
> property. Use a template column for this.
>
> Does this help?
>
> Ken
> Microsoft MVP [ASP.NET]
> Toronto
>
> <style>
> .myclass { font-size: 1.17em;
> text-decoration: none;
> color: #333399;
> }
> </style>
>
>                    <asp:templatecolumn>
>                        <itemtemplate>
>                            <asp:linkbutton CssClass="myclass"
> runat="server" Text="Edit" CommandName="Edit"
> CausesValidation="false"></asp:linkbutton>
>                        </itemtemplate>
>                        <edititemtemplate>
>                            <asp:linkbutton CssClass="myclass"
> runat="server" Text="Update" CommandName="Update"></asp:linkbutton>&nbsp;
>                            <asp:linkbutton  CssClass="myclass"
> runat="server" Text="Cancel" CommandName="Cancel"
> CausesValidation="false"></asp:linkbutton>
>                        </edititemtemplate>
>                    </asp:templatecolumn>
>
>
> "Maziar Aflatoun" <ma***@rogers.com> wrote in message
> news:n-WdnaN446xa9IzfRVn-og@rogers.com...
>> Hi,
>>
>> Does anyone know how I can add a css to the following link button. I want
>> to add it so that Update, Cancel and Edit have the css in the form of <a
>> href="" class="">Update</a>
>> <asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update"
>> CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
>>
>> Thank you
>> Maz.
>>
>>
>