Как я могу взять / поймать динамический параметр (в виде строки запроса) в файл. cs
Hello I came up with situation where I am taking value from user in the form of querystring. Ex: sitename/sample.aspx?username=''&userid='' cs file string Username = ""; if (Request.QueryString["username"] != null) { Username = Request.QueryString["username"].ToString(); } string userid = ""; if (Request.QueryString["userid"] != null) { userid = Request.QueryString["userid"].ToString(); } Name of first 2 parameter is fix,so name name of querystring is fix.After these 2 parameter,user may enter or may not enter any parameter.Parameter count can be from 1 to many and vary in datatype. Ex: sitename/sample.aspx?username=''&userid=''&Date= Ex: sitename/sample.aspx?username=''&userid=''&Date=&amount=
how can I take/catch dynamic parameter into .cs file?
Что я уже пробовал:
string Username = ""; if (Request.QueryString["username"] != null) { Username = Request.QueryString["username"].ToString(); } string userid = ""; if (Request.QueryString["userid"] != null) { userid = Request.QueryString["userid"].ToString(); }