Function :
public string GetTabIDURL(int PortalID, string ModuleName)
{ DataTable dt = new udf.Udf().Fill_DataTable("SELECT * FROM vw_Modules where modulename='" + ModuleName + "' and portalid=" + PortalID + " and tabid is not null");
return "~/tabid/" + dt.Rows[0]["tabid"].ToString() + "/default.aspx";
}
How to Call:
protected void GoToDetail_Click(object sender, EventArgs e)
{
int JobID = Convert.ToInt32((((LinkButton)sender).CommandArgument));
Response.Redirect(new udf.Udf().GetTabIDURL(this.PortalId, "bl_JobDisplay").ToString() + "?JobID=" + JobID);
}