|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Adding CSS to LinkButtonHi,
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. 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> <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. > > 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> > <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. >> >> >
How to pass the selected row of a datagrid to another form
Datagrid Dropdownlist in default in edit mode "parent / child" datagrids Datagrid ... pain .... HELP! CancelCommand Not Firing! problem updating in datagrid ?? JavaScript confirmation HyperLink column datagrid Set column names to template grid at runtime selection of fields in datatable for Datagrid |
|||||||||||||||||||||||