Geeks With Blogs

News
Google

Aaron Li's Blog Write it down before I forget
I have a big Excel list with about 40,000 rows(list A), and another list with 3000 rows(list B). I need to find those in list B from list A and remove them. Both A and B have an ID column containg same information.Of course, I think about VLOOKUP() function, but, it could take some time to copy the formula by manually dragging through the 40,000 rows, ......

Internationalization (i18n) is a way of designing and developing a software product to function in multiple locales. This process involves identifying the locales that must be supported, designing features which support those locales, and writing code that functions equally well in any of the supported locales. Localization (L10n) is a process of modifying ......

My senario: Get latest NumberOfPosts posts for every discussion which meet myCondition SELECT DiscussionTopPosts.PostID From ( SELECT p.DiscussionID, p.PostID, ROW_NUMBER() OVER (PARTITION BY p.DiscussionID ORDER BY p.DateCreated DESC) AS RowNumber FROM Posts p WHERE p.DiscussionID IN ( SELECT d.DiscussionID FROM Discussions d Where myCondition ) AND ......

--- C# --- string vBrowser = System.Web.HttpContext.Curr... // or string vBrowser = Request.Browser.Browser.ToL... //for local page switch (vBrowser) { case "firefox": do something ... break; case "ie": do something ... break; case "safari": do something ... break; default: do something ... break; } ......

When a page is using a master page, and that master page is using another master page, and so on, then how to find a control on the page? For example, my pages could have three-level master pages. Let's call the third-level master page Master3, which contains a ContentPlaceHolder called PlaceHolder3; Master3's master page is Master2, which contains ......

Generally, the following code can lead the hyper link to a named anchor <a name="aMyGoTo"></a> <a href="#aMyGoTo">go to the defined point</a> However, in IE, sometimes it seems the named anchor doesn't work. Here is the solution. To replace <a name="aMyGoTo"></a> with <span style="position:absolute;"&... id="aMyGoTo">&nbsp;&... ......

Scenario: I have a masterpage, and there is a search text box on it. For most pages, when the page is loaded, I want to set focus on the search box; for other pages, to a control on that page. Rather than set focus on every page, I create a pulic function in a class. For those pages the focus is set to a specific control, this function is called. public ......

C# doesn't support optional arguments/parameters. It's done by overriding the function.
Optional arguments/parameters are used in VB.NET, and they must be listed last and must have a default value.

Today, I tried to control a html link with a tag and a function (in c#) like the following, <a href="<%#GetTopLink(Eval... protected string GetTopLink(string vUrl) { if (<true>) return vUrl; else return "javascript: window.open('" + vUrl + "','new'); void(0);"; } It doesn't seems ......

add this single line into Javascript portion,

String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); };

then test with

var mystring="test   ";
alert(mystring.trim());

Senario 1: there is a databound control on the page, for example, a Repeater, and for every row, there is a Delete button/link. Senario 2: on the same page, there is a Delete All button/link. In Senario 1, we want to know which row to delete after the postback. In Senario 2, if we use asp button and related event handler, generally the process is Page_Load() ......

Scenario: I have a repeater with people’s name listed. Next to every name, there is a checkbox used to select people. Every time, only 2 people can be selected. HTML portion, <asp:Repeater ID="Repeater1" runat="server" EnableViewState = "false"> <ItemTemplate> <asp:CheckBox ID="CheckBox1" runat="server" onclick="CheckedChanged(thi... ......

Page Life Cycle In ASP.NET 2.0 Stage Event What To Do What Done Initialization Page PreInit - change themes, master pages - access properties for a profile master pages, themes, etc. are applied Control Init Page Init - read or initialize properties of controls in the control hierarchy. - add dynamic controls that need to utilize view state Controls ......

View State and TextBoxes, CheckBoxes, DropDownLists There is a common misunderstanding among developers that view state is somehow responsible for having TextBoxes, CheckBoxes, DropDownLists, and other Web controls remember their values across postback. I was one of them. This is not the case, because the values are identified via posted back form field ......

Custom Validator Does Not Fire I have code like this, <asp:TextBox ID="txtEmailBody" Runat="server" /> <asp:CustomValidator ID="valEmailBody" Runat="server" ControlToValidate=" txtEmailBody " Display="None" OnServerValidate="Validate_... " ErrorMessage="*" /> CustomValidator event does not fire if the validated control is empty. If ......

Copyright © Aaron Li | Powered by: GeeksWithBlogs.net