May 13, 2014, 4:57 PM
[CLOSED] How can Xscript code call code behind method..need syntax
Hi,
Can control be passed on from client side script within XScript tag to a method in .cs page?
Like i have a popup that opens from a function in Xscript
Now I want to call a code behind function like the following
Can control be passed on from client side script within XScript tag to a method in .cs page?
Like i have a popup that opens from a function in Xscript
open : function () {
rec = this.getRecord();
if (rec != null) {
win = #{winInvite};
win.show();
// win.setTitle(Ext.String.format("Employee Details : {0}, {1}", rec.data.LastName, rec.data.FirstName));
//
#{idInviteEmail}.getForm().loadRecord(rec);
#{idPasscodeEmail}.getForm().loadRecord(rec);
}
Now I want to call a code behind function like the following
public void btnSendEmail_Click(object sender, EventArgs e)
{
string strFrom="",strTo="",strCC="",strSubInv="",strMsgInv="" ,strSubPasscode="",strMsgPasscode="", strPojs="";
int flagEmailInv,flagEmailPasscode;
int idTab = this.TabPanel1.ActiveTabIndex;
strPojs = this.idProjects.Value.ToString();
Session["Projects"] = strPojs;
//From, To and CC fields are common to both tabs of the popup
strFrom = this.idFromInvite.Value.ToString();
strTo = this.idToInvite.Value.ToString();
strCC = this.idCCInvite.Value.ToString();
strSubInv = this.idSubjectInvite.Value.ToString();
strMsgInv = this.idMsgInvite.Value.ToString();
strSubPasscode = this.idSubjectPasscode.Value.ToString();
strMsgPasscode = this.idMsgPasscode.Value.ToString();
//Email sending for Invitation
flagEmailInv = SendEmail(strFrom, strTo, strCC, strSubInv, strMsgInv);
Session["flagEmailInv"] = flagEmailInv;
//Return codes saved in hidden field of grid
if (flagEmailInv == 1)
this.idInvFlag.Text = "1";
else
this.idInvFlag.Text = "0";
//Email sending for Passcode
flagEmailPasscode = SendEmail(strFrom, strTo, strCC, strSubPasscode, strMsgPasscode);
Session["flagEmailPasscode"] = flagEmailPasscode;
if (flagEmailPasscode == 1)
this.idPasscodeFlag.Text = "1";
else
this.idPasscodeFlag.Text = "0";
}
Thanks for all the help.
Last edited by Daniil; May 20, 2014 at 7:55 AM.
Reason: [CLOSED]