Hey, I have got the code below from which you will able to get the solution for your Javascript's Location.replace() Function:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial start : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs ea)
{
if (Request.Browser["IsMobileDevice"] == "true")
{
Response.Redirect("firstPage.aspx");
}
else
{
Response.Redirect("secondPage.aspx");
}
}
}
Bookmarks