I've got function WCFJSON
function WCFJSON() {
var userid = "2";
Type = "POST";
Url = "Service.svc/GetUser";
Data = '{"Id": "' + userid + '"}';
ContentType = "application/json; charset=utf-8";
DataType = "json"; varProcessData = true;
CallService();
}
This function is called when document is ready:
$(document).ready(
function () {
WCFJSON();
}
);
As a result I get dialog box with value corresponding to userid = "2".
Now the question is how do I display the result in page body instead of dialog box? As far as I can understand, I should mention this function in
Help me plase with correct syntax for doing that.
Full html code is shown below:
"http://www.w3.org/TR/html4/loose.dtd">
Loading
Shankar MPosted Nov 9, 2012, 3:25 AM
Something like this,
Using the Text Property, you can assign to the label.
label1.Text ="Programming";
And, Using it through a function
Suppose, DisplayMessage is the function which returns a text,
public string DisplayMessage()
{
string text = "Programming";
return text;
}
And, You can assign the string returned to the label control like,
label1.Text = DisplayMessage().ToString();
I apologise if there is anything wrong, being a Novice too.
Thanks,
Shankar
Marchello LippiPosted Nov 9, 2012, 3:11 AM
would you please show me some example? I'm complete newbie, please help.
Shankar MPosted Nov 9, 2012, 3:07 AM
Why can't you add a label to the Page, and display the returned message in the label's Text Prooperty.
Thanks,
Shankar