Information Technology Solutions, Answers and Experts
Write an Article Ask a Question

asp:buttion , history.back

szabelin
P: n/a
szabelin
Hello,

how do I do history back when asp:button is clicked? I
can't use <input button> - I have to use asp:button.


Thanks!
Nov 17 '05 #1

4 Replies



Vidar Petursson
P: n/a
Vidar Petursson

re: asp:buttion , history.back

Hi

myButton.Attributes.Add("onclick","history.back()" );

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"szabelin" <sergey_zabelin@countrywide.com> wrote in message
news:046b01c344ba$b6012500$a101280a@phx.gbl...[color=blue]
> Hello,
>
> how do I do history back when asp:button is clicked? I
> can't use <input button> - I have to use asp:button.
>
>
> Thanks![/color]


Nov 17 '05 #2

szabelin
P: n/a
szabelin

re: asp:buttion , history.back



I tried this already - it doesn't work for me. A button
click causes postback to server. Is there a way to cancel
postback? Here is my script code:

<asp:Button CssClass="AllButtons" CausesValidation="False"
Width="100px" Height="28px" Runat="server" Text="Back"
ID="NavBack" Enabled="True"></asp:Button>


and I added:
NavBack.Attributes.Add("onclick","history.back()") ;
in the Page_Load.....


thanks
Sergey



[color=blue]
>-----Original Message-----
>Hi
>
>myButton.Attributes.Add("onclick","history.back() ");
>
>--
>Best Regards
> Vidar Petursson
> ==============================
>Microsoft Internet Client & Controls MVP
> ==============================
>"szabelin" <sergey_zabelin@countrywide.com> wrote in[/color]
message[color=blue]
>news:046b01c344ba$b6012500$a101280a@phx.gbl...[color=green]
>> Hello,
>>
>> how do I do history back when asp:button is clicked? I
>> can't use <input button> - I have to use asp:button.
>>
>>
>> Thanks![/color]
>
>
>.
>[/color]
Nov 17 '05 #3

Vidar Petursson
P: n/a
Vidar Petursson

re: asp:buttion , history.back


NavBack.Attributes.Add("onclick","history.back(); return false");

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"szabelin" <sergey_zabelin@countrywide.com> wrote in message
news:02a201c344c5$19815be0$a501280a@phx.gbl...[color=blue]
>
>
> I tried this already - it doesn't work for me. A button
> click causes postback to server. Is there a way to cancel
> postback? Here is my script code:
>
> <asp:Button CssClass="AllButtons" CausesValidation="False"
> Width="100px" Height="28px" Runat="server" Text="Back"
> ID="NavBack" Enabled="True"></asp:Button>
>
>
> and I added:
> NavBack.Attributes.Add("onclick","history.back()") ;
> in the Page_Load.....
>
>
> thanks
> Sergey
>
>
>
>[color=green]
> >-----Original Message-----
> >Hi
> >
> >myButton.Attributes.Add("onclick","history.back() ");
> >
> >--
> >Best Regards
> > Vidar Petursson
> > ==============================
> >Microsoft Internet Client & Controls MVP
> > ==============================
> >"szabelin" <sergey_zabelin@countrywide.com> wrote in[/color]
> message[color=green]
> >news:046b01c344ba$b6012500$a101280a@phx.gbl...[color=darkred]
> >> Hello,
> >>
> >> how do I do history back when asp:button is clicked? I
> >> can't use <input button> - I have to use asp:button.
> >>
> >>
> >> Thanks![/color]
> >
> >
> >.
> >[/color][/color]


Nov 17 '05 #4

szabelin
P: n/a
szabelin

re: asp:buttion , history.back


Thank you Vidar.

Sergey

[color=blue]
>-----Original Message-----
>
>NavBack.Attributes.Add("onclick","history.back( ); return[/color]
false");[color=blue]
>
>--
>Best Regards
> Vidar Petursson
> ==============================
>Microsoft Internet Client & Controls MVP
> ==============================
>"szabelin" <sergey_zabelin@countrywide.com> wrote in[/color]
message[color=blue]
>news:02a201c344c5$19815be0$a501280a@phx.gbl...[color=green]
>>
>>
>> I tried this already - it doesn't work for me. A button
>> click causes postback to server. Is there a way to[/color][/color]
cancel[color=blue][color=green]
>> postback? Here is my script code:
>>
>> <asp:Button CssClass="AllButtons"[/color][/color]
CausesValidation="False"[color=blue][color=green]
>> Width="100px" Height="28px" Runat="server" Text="Back"
>> ID="NavBack" Enabled="True"></asp:Button>
>>
>>
>> and I added:
>> NavBack.Attributes.Add("onclick","history.back()") ;
>> in the Page_Load.....
>>
>>
>> thanks
>> Sergey
>>
>>
>>
>>[color=darkred]
>> >-----Original Message-----
>> >Hi
>> >
>> >myButton.Attributes.Add("onclick","history.back() ");
>> >
>> >--
>> >Best Regards
>> > Vidar Petursson
>> > ==============================
>> >Microsoft Internet Client & Controls MVP
>> > ==============================
>> >"szabelin" <sergey_zabelin@countrywide.com> wrote in[/color]
>> message[color=darkred]
>> >news:046b01c344ba$b6012500$a101280a@phx.gbl...
>> >> Hello,
>> >>
>> >> how do I do history back when asp:button is clicked?[/color][/color][/color]
I[color=blue][color=green][color=darkred]
>> >> can't use <input button> - I have to use asp:button.
>> >>
>> >>
>> >> Thanks!
>> >
>> >
>> >.
>> >[/color][/color]
>
>
>.
>[/color]
Nov 17 '05 #5

Post your reply

Sign in to post your reply or Sign up for a free account.



Didn't find the answer to your question? Post your ASP.NET question on Bytes

You can also browse similar questions: ASP.NET

Get ASP.NET Help

Get ASP.NET help from a network of professionals.

Post your Question » Over 331,210 Members | 3392 Online