Home > front end >  The great god help me ah
The great god help me ah

Time:12-22

How to put the figure 1 a drop-down box to select the value of the query in figure 2 to

CodePudding user response:

Refer to the https://www.cnblogs.com/lcl_1015/articles/1865823.html

CodePudding user response:

Front end and values:
Js:
$(" # test2 "). Click (function () {
$. Ajax ({
Type: "post",
Url: "Handler. Ashx,"
Data: {m: 'a'},
Success: the function (result) {
$(" # testText "). Append (result + "& lt; Br/& gt;" );
}
});
});

Handle receiving:

[System. Web. Script. Services. ScriptService]
Public class BaseService: AHttpHandler
{
Public override void the ProcessRequest (string method)
{
The switch (method)
{
Case "DocInfo" :
GetDocInfo (context);
break;
Default:
break;
}
}
Public virtual void GetDocInfo (HttpContext contex)
{
Try
{
String dir=context. Request. Params [" dir "]==null? "" : context. Request. Params [r]." dir "ToString ();

String strJson=Newtonsoft. Json. JsonConvert. SerializeObject (di);
Contex. Response. Write (strJson);
}
}
The catch (Exception ex)
{
Logger. The Log. The Error (SPContext. Current. Web. CurrentUser. LoginName and ex);
}
}
}


CodePudding user response:

reference 1st floor usecf response:
reference under the https://www.cnblogs.com/lcl_1015/articles/1865823.html
is there any specific code

CodePudding user response:

refer to the second floor xiaoxiang dream response:
front end by value:
Js:
$(" # test2 "). Click (function () {
$. Ajax ({
Type: "post",
Url: "Handler. Ashx,"
Data: {m: 'a'},
Success: the function (result) {
$(" # testText "). Append (result + "& lt; Br/& gt;" );
}
});
});

Handle receiving:

[System. Web. Script. Services. ScriptService]
Public class BaseService: AHttpHandler
{
Public override void the ProcessRequest (string method)
{
The switch (method)
{
Case "DocInfo" :
GetDocInfo (context);
break;
Default:
break;
}
}
Public virtual void GetDocInfo (HttpContext contex)
{
Try
{
String dir=context. Request. Params [" dir "]==null? "" : context. Request. Params [r]." dir "ToString ();

String strJson=Newtonsoft. Json. JsonConvert. SerializeObject (di);
Contex. Response. Write (strJson);
}
}
The catch (Exception ex)
{
Logger. The Log. The Error (SPContext. Current. Web. CurrentUser. LoginName and ex);
}
}
}
great god so long code

CodePudding user response:

refer to the second floor xiaoxiang dream response:
front end by value:
Js:
$(" # test2 "). Click (function () {
$. Ajax ({
Type: "post",
Url: "Handler. Ashx,"
Data: {m: 'a'},
Success: the function (result) {
$(" # testText "). Append (result + "& lt; Br/& gt;" );
}
});
});

Handle receiving:

[System. Web. Script. Services. ScriptService]
Public class BaseService: AHttpHandler
{
Public override void the ProcessRequest (string method)
{
The switch (method)
{
Case "DocInfo" :
GetDocInfo (context);
break;
Default:
break;
}
}
Public virtual void GetDocInfo (HttpContext contex)
{
Try
{
String dir=context. Request. Params [" dir "]==null? "" : context. Request. Params [r]." dir "ToString ();

String strJson=Newtonsoft. Json. JsonConvert. SerializeObject (di);
Contex. Response. Write (strJson);
}
}
The catch (Exception ex)
{
Logger. The Log. The Error (SPContext. Current. Web. CurrentUser. LoginName and ex);
}
}
}
is there any less
  •  Tags:  
  • ASP
  • Related