CS section:
Using system. Web. UI;
Public partial class portal_pages_sa_manage_manage_panel: system. Web. UI. Page, icallbackeventhandler
{
Public String callbackvalue = string. empty;
String icallbackeventhandler. getcallbackresult ()
{
Return callbackvalue;
}
// Only one parameter can be accepted. This is not a good choice.
Void icallbackeventhandler. raisecallbackevent (string eventargument)
{
// The following is the custom operation content.
// String oldids = This. hdnidnew. value; // note: the value of the hidden control cannot be obtained.
String [] Infos = eventargument. Split (",". tochararray (), stringsplitoptions. removeemptyentries );
String [] arrids = new string [Infos. Length];
Stringbuilder strids = new stringbuilder ();
String strsplit = "";
Int n = 0;
Foreach (string STR in Infos)
{
If (Str. length> 3)
{
Strids. append (strsplit). append (STR );
Strsplit = ",";
}
Else
{
Arrids [N] = STR;
N ++;
}
}
}
}
JS call Section:
<SCRIPT type = "text/JavaScript">
Function callserver (IDS)
{
// IDS is the parameter passed to the background, and only one
<% = Page. clientscript. getcallbackeventreference (this, "IDS", "eseserverdata", null) %>
}
Function compute eserverdata (Rvalue)
{
// Success prompt
}
Function funselall ()
{
VaR STR = "";
.
Callserver (STR );
Return false;
}
</SCRIPT>