25. March 2009
Programming , VB.NET
1: Public Sub MergeDataTables(source as DataTable, destination As DataTable)
4: For i As Integer=0 To source.Rows.Count - 1
9: End Sub
Reference: by All-Star at http://forums.asp.net/p/1075389/1578419.aspx
ASP.NET 2.0 simplified this problem and introduce a concept of "default focus". There is a new DefaultFocus attribute that allows you to easily set focus to desired controls. The sample HTML code bellow will set focus on control named textbox1:
<form id="Form1" defaultfocus="textbox" runat="server">
<asp:textbox id="textbox1" runat="server"/>
<asp:textbox id="textbox2" runat="server"/>
<asp:button id="button1" text="Button1" runat="server"/>
ASP.NET 2.0 provides three different new solutions if you need to set focus dynamically. At run time you can use Page.SetFocus method with control's ID as a parameter or you can simply call a new control's Focus method. They both do practically the same thing. It is only programmer's choice to choose which method likes more.
There is also DefaultFocus property of the form element. Set this property to ID of wanted control, run the project and that control will get focus when page is first time loaded.
1: pnlLookupDetail.Visible = True
The Full Article can be found here, http://www.beansoftware.com/asp.net-tutorials/focus-asp.net.aspx
This is actually pretty easy and I had needed to use it on a page where I wanted to use a ToolTip of the contents of an editor which stored the HTML of the content...
Using Regular Expression we can strip off the HTML tags.
1: Dim ContentDataStrippedOfHTML As StringContentDataStrippedOfHTML = Regex.Replace(SourceOriginalDataStringHere, "<(.|\n)*?>", String.Empty)
Right to the point.