Simple back button in

Posted on 2006-05-10
Last Modified: 2008-04-03
In asp I would code <input type = "button" value="Back" onclick=window.history.back(1)> how can this be done in

Question by:mojohys
    LVL 19

    Accepted Solution

    write the line in the pageload event:
    Button1.Attributes.Add("OnClick", "javascript:history.back(1);return false;")
    where Button1 is your serverside button control
    LVL 35

    Expert Comment

    you can still do this:

    <input id="btnBack" type = "button" value="Back" onclick="history.back()">


    put the following in Page_Load event:
    btnBack.Attributes.Add("onlick", "javascript:history.back();")

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
    Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now