title: How can I create SQL Query which Takes Parameters from URL in asp.net C#
body: <p>my link is like </p>
  
  <pre><code>http://localhost/default.aspx?phone=9057897874&amp;order=124556
  </code></pre>
  
  <p>Here Is my basic Page for passing Parameter In URL from ASP.net</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"     Inherits="WebApplication2._Default" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
  &lt;head runat="server"&gt;
  &lt;title&gt;Untitled Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form method="get" action="default.aspx"&gt;
  
  &lt;label&gt;Phone No&lt;/label&gt;
  &lt;input type="text" name="phone" /&gt;
  &lt;br /&gt;
  &lt;label&gt;Order No&lt;/label&gt;
  &lt;input type="text" name="order" /&gt;
  &lt;br /&gt;
  &lt;input type="submit" value="submit" /&gt;
  &lt;br /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>my c# file where I can store the prameters in Variables </p>
  
  <pre><code>namespace WebApplication2
   {
  public partial class _Default : System.Web.UI.Page
  {
      protected void Page_Load(object sender, EventArgs e)
      {
          string strQuery;
  
          string phone = Request.QueryString["phone"];
          if (phone != null)
          {
              Response.Write("phone no is ");
              Response.Write(phone);
          }
          else
  
          {
              Response.Write("You phone number is not correct");
          }
  
          string order_no = Request.QueryString["order"];
          if (order_no != null)
          {
              Response.Write("Order No is ");
              Response.Write(order_no);
          }
          else
          {
              Response.Write("You Order number is not correct");
          }
  
  //How I can Connect to Mysql Server
  
          strQuery = "SELECT order_status where orde01=''" + order_no + "'' and phone01=''" + phone + "''";
  
          Response.Write(strQuery);
  }
  }
  </code></pre>
  
  <p>I'm trying to doing something like this but it's only give me whole query as string.
  I am new on this topic.
  Any help will be appreciate
  Thanks </p>