<td class="ui-widget-header gvHeader ui-helper-hidden" style="width: 17%" runat="server" id="tdPack">
Pack :
</td>
I want to remove the class 'ui-helper-hidden' using C# code. How ?
<td class="ui-widget-header gvHeader ui-helper-hidden" style="width: 17%" runat="server" id="tdPack">
Pack :
</td>
I want to remove the class 'ui-helper-hidden' using C# code. How ?
assuming several things due to lack of details, you might try:
tdPack.CssClass = tdPack.CssClass.Replace("ui-widget-header", String.Empty);
or if that is HtmlTableCell than:
tdPack.Attributes["class"] =
Attributes["class"].Replace("ui-widget-header", String.Empty);
first of all, you should retag your question!
then: provide more information!
then: i assume that ui-helper-hidden is added by a plugin - this means, that this is not the rendered source rather the computed sourced - you will not be able to change the class-attribute...
the crucial question: do you know the difference between server- and client-side?
you will have to use jquery or any other javascript (lib), to do sth like
$(document).ready(function () {
var $cell = $('#yourControlId);
// or
var $cell = $('.ui-helper-hidden');
$cell.removeClass('ui-helper-hidden');
});
another crucial question here:
if this is your code, why don't you leave the unwanted ui-helper-hidden-class out? your supported code shows, that you have the control over the code and there's no plugin or sth alike involved ...