There is a problem which i am facing the problem is my url Routing code is not working This is my first time practice so please help me.
My Global.asax code is
<%@ Application Language="C#" %>
<%@ Import Namespace="System.Web.Routing" %>
<%@ Import Namespace="System" %>
And My searchresult.aspx.cs Code is
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using Datalayer;
public partial class searchresult : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ConnectionString);
public string location, builder, project;
public string myloction, mybuilder, myproject;
protected void Page_Load(object sender, EventArgs e)
{
location = Request.QueryString["location"].ToString();
myloction = location.Replace("---Select---", "");
builder = Request.QueryString["builder"].ToString();
mybuilder = builder.Replace("---Select---", "");
project = Request.QueryString["pname"].ToString();
myproject = project.Replace("---Select---", "");
if (!IsPostBack)
{
getallrecords();
}
//string id = Page.RouteData.Values["location"].ToString();
//string build = Page.RouteData.Values["builder"].ToString();
//string pname = Page.RouteData.Values["pname"].ToString();
//Response.Write("
Customer Details page
");// Response.Write(string.Format("Displaying information for customer : {0}", id));
}
My Current url is http://localhost:28654/costodianinfra/searchresult.aspx?location=Lucknow&builder=DLF&pname=My%20pad
and i want url like this http://localhost:28654/costodianinfra/searchresult/location/Lucknow/builder/DLF/pname/Mypad
so please help me
Thanx
Gopal
Gopal Ji SinghPosted May 23, 2014, 12:51 AM
Bhabani PrasadPosted May 22, 2014, 6:45 AM
Lakshmanan Sethu SankaranarayanPosted May 22, 2014, 6:42 AM
Bhabani PrasadPosted May 22, 2014, 6:40 AM