如何使用C#/ JQuery更改XSL文件的内容样式

时间:2014-11-07 18:14:42

标签: c# jquery asp.net xslt ektron

如果spnCity的值为“ABC”,则将id1设置为类(tableHeading),否则将id1设置为类(tableHeading2

如何在Web处理程序中从代码隐藏中访问spnCity范围,或者如果不可能,我如何使用JQuery访问它。

我的偏好是真正使用C#代码隐藏,因为我有一个执行某些复杂操作的函数。

DateTime now = DateTime.Now;
//DateTime test = DateTime.Now.AddHours(8);
string time = now.ToString("T");

static public bool IsTimeOfDayBetween(DateTime time, TimeSpan startTime, TimeSpan endTime)
{
    if (endTime == startTime)
    {
        return true;
    }
    else if (endTime < startTime)
    {
        return time.TimeOfDay <= endTime ||
            time.TimeOfDay >= startTime;
    }
    else
    {
        return time.TimeOfDay >= startTime &&
            time.TimeOfDay <= endTime;
    }

}

1 个答案:

答案 0 :(得分:1)

由于您问if that is not possible, how do I access it using JQuery.,我正在编写使用jquery访问该问题的答案。以下是jQuery代码,用于访问该跨度值。

$("#id1 h4 span").text().trim()