Question
There is a WebMethod called Reverse in GetReply.aspx.cs. Some of the code has already been filled in for you. Please add C# code so the
- There is a WebMethod called Reverse in GetReply.aspx.cs. Some of the code has already been filled in for you. Please add C# code so the WebMethod:
- Accepts a string as a parameter from the web page.
- Reverses the string.
- Return the reversed string to the web page.
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.Services;
public partial class GetReply : System.Web.UI.Page { [WebMethod] public static string Login(string userName) { var acceptedNames = new List
if (acceptedNames.Contains(userName) ){ return "Accepted"; } else { return "Denied"; } }
[WebMethod] public static string Reverse(string strInput) { string strReturnVal;
// Replace this with code to reverse the string strReturnVal = strInput;
return strReturnVal; }
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started