OnlineAjaxThe conversation went viral. Recently, I went to see the project and wrote an article about it.PopThe prompt box is small.Program
The running result is as follows:
File description
Popwin. JS: The JS file in the pop-up prompt box does not need to be changed (this is public)
Ajax. dll: This is an Ajax component.
Source code
The most unfortunate thing about Ajax is that you cannot bind a DataGrid Server Control.
This is the only way to write data in a DataGrid.
[Ajax. ajaxmethod ()]
Public String getajaxtable ()
{
Try
{
Datatable dt = new datatable ();
Salesmanagerquery m_salesmanagerquery = new salesmanagerquery ();
Dt = m_salesmanagerquery.getsales ();
// Datagrid1.datasource = DT;
// Datagrid1.databind ();
// DataGrid DG = new DataGrid ();
DG. datasource = DT;
DG. databind ();
DG = maid;
maid = false;
system. text. stringbuilder strb = new system. text. stringbuilder ();
system. io. stringwriter Sw = new system. io. stringwriter (strb);
system. web. UI. htmltextwriter HTW = new htmltextwriter (SW);
DG. rendercontrol (HTW);
string S = strb. tostring ();
return s;
}< br> catch (exception ex)
{< br> throw ex;
}< BR >}