ASP. NET built-in mechanism does not refresh new pages

Source: Internet
Author: User
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>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.