我有一个Web服务来填充HTML标记。Web服务响应并将其分割为多个
[WebMethod]
public string GetHelloMessage(string country)
{
string test = "<div>amin</div>";
return test;
}
和jQuery是:
url: ServiceUrl,
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "jsonp",
timeout: 15000,
success: function (d) {
if (d.length > 0) {
var c = JSON.parse(d);
if ($(".test1div").length) {
$(".test1div").html(c.Content1)
}if ($(".test2div").length) {
$(".test2div").html(c.Content2)
}
如何编写Web服务,以填补test2div标签?如何添加以从Web服务返回文本?例如:
string Content1 = "<div>amin</div>";
string Content2 = "<div>reza</div>;
string Content3 = Content1 + Content2;
return Content3;
请帮助我更多的解释。
当你解决问题时,你应该接受一个答案和upvote。 – pid