I use .NET Framework. I have a files in a folder. Physical path like:
https://example.com/folders/123aaa.jpg
And I have a button to redirect this link. But I don't want to show this path. I want user to see like:
https://example.com/display.aspx
Is there any way to do that?
<asp:Button ID="eg" runat="server" CausesValidation="false" CommandName="Save"
private void save(int i)
{
GridViewRow row = GridView7.Rows[i];
string sid = row.Cells[0].Text;
SqlCommand cmd = new SqlCommand("xxx", con);
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@id", sid);
con.Open();
SqlDataReader rd = cmd.ExecuteReader();
if (rd.HasRows)
{
while (rd.Read())
{
string url = rd[0].ToString();
}
}
Response.Redirect(url,false);
}