Ignoring specific tags in ASP.NET?

Hello,

is it possible to ignore specific tags in ASP.NET when scanning the project?

Especially i want to completely ignore everything where the "Bind()" syntax is used, such as ItemTemplates in GridViews. When the ML Addin adds "meta:resourcekeys" to those places in the ASPX source an exception is raised upon application start (it leads to a double definition of the text and that is not allowed)

It would be fine if the Addin would completely ignore tags where the Bind() or Eval() syntax is used when scanning ASP.NET pages.

Ciao,
Ralf

Germany

This is simply an error in the Add-In. I think that you are talking about tags like this...

Example
<asp:Label ID="titleLabel" runat="server" Text='<%# Bind("title") %>'></asp:Label>

I am not an expert on the binding syntax. Should the Add-In prevent localization of any item where the text property is defined as '<%# xxxxxx %>', i.e. with less-than + percent + hash?

I will take a look at it later this evening. If it is easy I will try to fix it immediately.

Phil

Germany

I have just uploaded a new version (4.60.0010) which should detect ASP tags which use binding syntax. The tags still show up in the grid, but they can't be translated.

As I understand it, binding syntax is incompatible with the meta:resourcekey tag. I've been wondering whether there might be a case where one attribute is bound to a data field, but another attribute of the same tag is localizable. I think that this must be impossible.

I have left the data bound ASP tags in the grid, because I presume that they can have nested tags. Otherwise, it might be better to suppress them completely.

Phil


Hi,

great to hear about the new version! I will test is as soon as possible.

One additional thing: That applies not only to the methods "Bind()" or "Eval()"! In ASP.NET it is possible to use pagemethods inside the "" tag. So i think that it would be good to igner all tags where things like "Text=" are used!

Ciao,
Ralf


Hi,

Just a little feedback: i have just installed the current version and it works great. The (for example" ItemTemplate.Text tags are now marked as non-localizable. I also noticed that you have implemented not only to ignore Bind() and Eval() but also all method calls in ""! So my last post can be ignored biggrin

Thanks,
Ralf


Oops in my last post the forum software has deleted all text like '<%# xxxxxx %>' i wrote. I had not written them as html-entities sad

But i think that you will understand my posts anyway...


For me this fix might be a problem.

Example
<asp:CheckBox ID="IsLogarithmicCheckBox" runat="server" Checked=''
ToolTip="Geben Sie hier an ob die Achse eine logarithmische Skala verwenden soll."/>

I can't figure out how to localize the ToolTip because ML want let me select the ToolTip.

OOPs, the bindingpart disappeared, it should be:
<asp:CheckBox ID="IsLogarithmicCheckBox" runat="server" Checked='<%# Bind("IsLogarithmic") %>'
ToolTip="Geben Sie hier an ob die Achse eine logarithmische Skala verwenden soll." />

Germany

I have just uploaded a new version (4.7x.0121) in which I have disabled the change mentioned in this thread (added in version 4.60.0010).

This should allow you to select the ToolTip attribute in your example.

I have tested that the Add-In detects the attribute and lets you select it. I have not tested that the localization actually works on the ASP web site.smile Can you let me know if it works as you expect?

Phil

Works perfect. Thank you very much.
Uli