Get URL Parameter "Query strings"

to get paraneter from url

string Url = "http://localhost:6109/CANSHOP/GenerateCoupons.aspx?CouponId=1&MemberId=4"; Uri tempUri = new Uri(Url); string sQuery = tempUri.Query; var query = HttpUtility.ParseQueryString(sQuery); string cId = query["CouponId"]; string mId = query["MemberId"];
<div style="overflow-x: scroll;"> <div style="width: 1324px;"> string Url = "http://localhost:6109/CANSHOP/GenerateCoupons.aspx?CouponId=1&MemberId=4"; Uri tempUri = new Uri(Url); string sQuery = tempUri.Query; var query = HttpUtility.ParseQueryString(sQuery); string cId = query["CouponId"]; string mId = query["MemberId"]; </div> </div>
  1. <code>
  2. <div style="overflow-x: scroll;">
  3. <div style="width: 1324px;">
  4. string Url = "http://localhost:6109/CANSHOP/GenerateCoupons.aspx?CouponId=1&MemberId=4";
  5. Uri tempUri = new Uri(Url);
  6. string sQuery = tempUri.Query;
  7. var query = HttpUtility.ParseQueryString(sQuery);
  8. string cId = query["CouponId"];
  9. string mId = query["MemberId"];
  10. </div>
  11. </div>
  12. </code>
<code>
<div style="overflow-x: scroll;">
<div style="width: 1324px;">
            string Url = "http://localhost:6109/CANSHOP/GenerateCoupons.aspx?CouponId=1&MemberId=4";
            Uri tempUri = new Uri(Url); 
            string sQuery = tempUri.Query;
            var query = HttpUtility.ParseQueryString(sQuery);
            string cId = query["CouponId"];
            string mId = query["MemberId"];
</div>
</div>
</code>

Popular posts from this blog

Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=xx.0.0.0, Culture=neutral, PublicKeyToken='xxx' or one of its dependencies.

C# Crop white space from around the image

The specified version string contains wildcards, which are not compatible with determinism.