Northwind.TestSite.Objects.URL.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
		public override string ToString()
		{
			string retval = this.Page;
			if (this.Parameters.Count != 0)
			{
				retval += "?";
				foreach (URLParameter item in this.Parameters)
				{
					retval += item.Name + "=" + item.Value + "&";
				}
			}

			if (retval.EndsWith("&"))
				retval = retval.Substring(0, retval.Length - 1);

			return retval;
		}
	

Usage Example

Example #1
0
		private void PagingControl1_RecordsPerPageChanged(object sender, EventArgs e)
		{
			var query = new URL(this.Request.Url.AbsoluteUri);
			query.Parameters.SetValue("rpp", PagingControl1.RecordsPerPage.ToString());
			query.Parameters.SetValue("po", "1");
			this.Response.Redirect(query.ToString());
		}
All Usage Examples Of Northwind.TestSite.Objects.URL::ToString