Question: Please add a new WebMethod to GetReply.aspx.cs. This method should: Accept a user name as input Scramble the letters of the user name into random

  1. Please add a new WebMethod to GetReply.aspx.cs. This method should:
    1. Accept a user name as input
    2. Scramble the letters of the user name into random order.
    3. Return the scrambled user name to the web page.
    4. Why does the WebMethod have to be public static ?

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 {"nana", "admin", "student"};

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!