将服务器端字符串传递给客户端拆分并显示..? [英] pass server side string to client side split and display ..?
本文介绍了将服务器端字符串传递给客户端拆分并显示..?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
public void RaiseCallbackEvent(String eventArgument)
{
string strStartTime = DateTime.Now.ToString("dd-MMM-yyyy hh:mm:ss:fff");
strOutput2 = strEndTime;
}
public string GetCallbackResult()
{
string strEndTime = DateTime.Now.ToString("dd-MMM-yyyy hh:mm:ss:fff");
strOutput2 = strEndTime;
string result=strOutput1+strOutput2;
return result;
}
i希望在客户端拆分 Callbackresult
并存储在变量中并为标签分配值如何这样做.. ??
i want to split Callbackresult
on client and store in variables and assign values to labels how to do it ..??
function fnGetOutputFromServer(arg) {
document.getElementById('divGridView').innerHTML = arg;
document.getElementById('lblGetServerTime').innerHTML = strOutput1;// pass values
document.getElementById('lblServerEndTime').innerHTML = strOutput2;//pass values
i知道如何如何在客户端拆分此结果..?
i know how to split but how how to split this result on client side..?
推荐答案
只需添加 runat =server
属性到Label。然后,您可以在服务器端访问它并设置文本属性。
Just add runat="server"
attribute to the Label. Then you can access that on Server side and set the Text Property.
这篇关于将服务器端字符串传递给客户端拆分并显示..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文