Hi t01779393200,
Refer below code.
HTML
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="auto clik" />
<script type="text/javascript">
window.onload = function () {
setTimeout(function () {
document.getElementById('<%=Button1.ClientID %>').click();
}, 5000);
};
</script>
Code
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("/");
}