title: redirect on another page on button click
body: <p>I am creating a web app and I have 2 textboxes and one button with an input field</p>
  
  <pre><code>&lt;input id="Login" type="submit" onclick="location.href='@Url.Action("loggedin","logincontroller")'" style="" width="200" height="34" value="submit" /&gt;
  </code></pre>
  
  <p>and my controller looks like</p>
  
  <pre><code>public ActionResult loggedin(string role, string username, string password)
  {
      webservice.loginservice a= new webservice.loginservice();
      a.getlogintype(role, username, password);
      return View();
  }
  </code></pre>
  
  <p>with my webservice</p>
  
  <pre><code>[WebMethod]
  public string getlogintype(string role, string username, string password)
  {
      string strtru="";
      string strfalse="";
      sqlcon;
      SqlCommand cmd = new SqlCommand("select * from [admin] where userid='" + username + "' and pass ='" + password + "'", con);
      con.Open();
      SqlDataAdapter da = new SqlDataAdapter(cmd);
      DataTable dt = new DataTable();
      da.Fill(dt);
      if (dt.Rows.Count &gt; 0)
      {
          strtru = "true";
  
      }
      else
      {
          strfalse = "false";
  
      }
      con.Close();
  }
  </code></pre>
  
  <p>My controller is calling the webservice and now I want to know how to redirect the page on successful validation. This is my first application using mvc I know there are many mistakes in this app(please let me know all the mistakes).</p>
  
  <p>I am creating the application on mvc 5 and I am only using input fields not <code>@Html</code> syntax because I want to design it like(<a href="http://beta2.hti-india.com" rel="nofollow">beta2.hti-india.com</a>) this app is created by me on asp.net c#.</p>