Resx strange problem encountered by Asp.net in dnn module development
Source: Internet
Author: User
Resx strange issues encountered during dnn module development
Recently, a previous crossarticle module was modified. Among them, the resourkey in the test. ascx file can only display the text value directly but not the value in the resx file.
Other ascx files can use the text in resx.
I checked for n times and went crazy. Generating resx under Tools menu of vs2008 cannot solve the problem.
Please give me a prompt. Thank you.
Related Code Parts:
<? XML: namespace prefix = ASP/> "resourcekey =" hyplreadmore ">
<TD align = "Left" nowrap>
<Asp: hyperlink id = "lnkreadmore" resourcekey = "hyplreadmore" visible = '<% # showreadmore %>' class = "normal" runat = "server" text = "details... "> </ASP: hyperlink>
</TD>
Then a few of my friends answered the question. Although the problem was not solved, it still gave me a prompt. Then, Google gave the answer by using "getresourcefile (this," "as the keyword.
==== Below is the answer:
In private void initializecomponent ()
Add "This. localresourcefile =
Dotnetnuke. Services. Localization. Localization. getresourcefile (this, "crossarticle. ascx ");"
Solve the problem.
URL involved:
Http://anforen.5d6d.com/thread-294-1-1.html
Http://dnnme.cn/showtopic-557.aspx
Another problem is:
At that time, I added a linkbutton on the ascx page, so I could not process the click event in the code behind file. Double-click the button on the page, it only processes the script code in the ascx file.
Check the code everywhere at the beginning.
The answer is as follows:
When the public abstract class is used, the button does not have lightning event settings in the attribute window. Change abstract to partial.
To
===
There are two small issues that have been solved. Here, I wrote this style. The main reason is that it will be enough for me and everyone to find clues at Google in the future.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service