Hi ivinraj25,
I have created sample code which full-fill your requirement.So please refer the below code logic and apply as per your requirement.I have used url routing in my sample code.
HMTL
Default.aspx
<div>
<asp:Button Text="Search" OnClick="OncLick" runat="server" />
</div>
C#
protected void OncLick(object sender, EventArgs e)
{
string locationName = "chennai";//"put your location name dynamically";
string doctor = "Doctor"; // put your data.
string saidapet = "saidapet";//put your data.
Response.Redirect(string.Format("doctordetails/{0}/{1}/{2}", locationname, doctor, saidapet));
}
Vb.Net
Protected Sub OncLick(sender As Object, e As EventArgs)
Dim locationName As String = "chennai"
'"put your location Name dynamically";
Dim doctor As String = "Doctor"
' put your data.
Dim saidapet As String = "saidapet"
'put your data.
Response.Redirect(String.Format("doctordetails/{0}/{1}/{2}", locationname, doctor, saidapet))
End Sub
SearchPage
C#
protected void Page_Load(object sender, EventArgs e)
{
//search keyword here and pass search keyword in your database.....
string LocationName = this.Page.RouteData.Values["Location"].ToString();
string doctor = this.Page.RouteData.Values["doctors"].ToString();
string saidapet = this.Page.RouteData.Values["saidapet"].ToString();
}
Vb.Net
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
'search keyword here and pass search keyword in your database.....
Dim LocationName As String = Me.Page.RouteData.Values("Location").ToString()
Dim doctor As String = Me.Page.RouteData.Values("doctors").ToString()
Dim saidapet As String = Me.Page.RouteData.Values("saidapet").ToString()
End Sub
Global.asax
static void RegisterRoutes(RouteCollection routes)
{
routes.MapPageRoute("Doctor", "doctordetails/{Location}/{doctors}/{saidapet}", "~/SearchPage.aspx");
}
Screenshot
