473,378 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

localized back button

I got it to work, but somehow it doesn't seem like the proper solution.
I can't switch anymore to design view for instance.

<input id="cmd_back" class=button type="button" value="<asp:Localize
ID='Localize13' Text='<%$ Resources:Catalogue, Back %>'
runat='server'></asp:Localize>" onclick="history.back(1);" />

I suppose it would be easier to use a <asp:button>, but I can't get
that one to not postback. As you can tell I am reasonably new to
asp.net 2. How do I manage to make an <asp:button> that does not post
back?

May 23 '06 #1
5 1855
You can use a <asp:Button> with its UseSybmitBehaviour property set to
false. Also, ypo can use its OnClientClick property to link to
javascript code.

-Dhanvanth

May 23 '06 #2
I tried that, but doesn't work.
<asp:Button ID="Button1" CssClass=button runat="server" Text="<%$
Resources:Catalogue, Back %>" UseSubmitBehavior="false"
OnClientClick="history.back(1);" />

This is the HTML it generates:
<input type="button" name="ctl00$MainContent$Button1" value="Back"
onclick="history.back(1);__doPostBack('ctl00$MainC ontent$Button1','')"
id="ctl00_MainContent_Button1" class="button" />

Now, if I could only get rid of
__doPostBack('ctl00$MainContent$Button1','').

May 23 '06 #3
Alternatively,
<asp:Localize ID='Localize13' Text='<%$ Resources:Catalogue, Back %>'
runat='server'></asp:Localize>
<input type="button" value="<%= Localize13.Text %>
<dh*******@gmail.com> wrote in message
news:11*********************@j73g2000cwa.googlegro ups.com...
You can use a <asp:Button> with its UseSybmitBehaviour property set to
false. Also, ypo can use its OnClientClick property to link to
javascript code.

-Dhanvanth

May 23 '06 #4
Thanks ... it works and I can switch to design-view again. It does
leave me to wonder: is there no way to prevent an ASP:button to do a
postback?

May 23 '06 #5
You can intercept the postback via javascript by adding a client side
onClick. Otherwise, no, that's what it does. If you don't need that
behaviour, use a server side HtmlButton:

<button id="b" runat="server" ... />

Karl

--
http://www.openmymind.net/

"Willem" <ww*********@gmail.com> wrote in message
news:11**********************@j55g2000cwa.googlegr oups.com...
Thanks ... it works and I can switch to design-view again. It does
leave me to wonder: is there no way to prevent an ASP:button to do a
postback?

May 23 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bogdan Zamfir | last post by:
Hi, I have big troubles with an Access2002 application I wrote it under Acc2002 Romanian, and try to run it on Acc2002 US version, and I have the following troubles For some forms, Load event...
3
by: Jerry | last post by:
Hi, MessageBox can be localized? It's say, Can I set the language of "OK", "Cancel" button.
0
by: Robert Misiak | last post by:
Hi all- I'm trying to add Windows 98/ME support to an app that previously only supported Windows 2000+. My test box is a running 98 SE. I have a number of localized forms (translated for...
1
by: GeorgeB | last post by:
I use HOW TO: Send Raw Data to a Printer by Using Visual Basic .NET <URL:http://support.microsoft.com/?scid=kb;EN-US;322090> to send text to a dotmatrix printer. I cannot print localized text...
3
by: Mark Findlay | last post by:
When programming reads of the Windows Registry, do the registry keys and values need to be localized for international use? For example, do I need to convert the key name...
1
by: Bob | last post by:
I had developped a class in Vs2003 Vb.net that would give me localized project ressources (not form ressources, these were in the individual forms). I had two files MyProjectResources.resx and...
1
by: cold80 | last post by:
I'm trying to understand how VS 2005 and the .NET Framework 2.0 can be used for a localized application. I've read a lot of messages, posts and guides but I can find a straight answer. I would like...
5
by: =?Utf-8?B?QXhlbCBEYWhtZW4=?= | last post by:
Hi, I've created a class library assembly containing several string resource files, like: - TableColumns.resx - TableColumns.de.resx - General.resx - General.de.resx
1
by: Radu | last post by:
For stuff like <asp:CustomValidator id="validDate" Text="*" ErrorMessage= "<%$ Resources:Scorecards, String66 %>" Display="Dynamic" OnServerValidate="ServerValidate" runat="server">...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.