November 2005 Entries

Converting existing ASP.NET Application to DotNetNuke -what is the best approach?

I've posted on ASP.NET forums the following: I have an existing ASP.NET 1.1 Application that includes more than hundred different ASPX pages and user controls (ASCX). The application consists of a number search forms, results lists and data details forms to view and edit database data. I am considering converting the application to DotNetNuke. I am looking for information what is the best approach for converting. Should I make all my User Controls be derived from Modules.PortalModuleBase or I can ......

Remove NewLine characters from the data in SQL Server

UPDATE: Xavid at 8/2/2007 in a comment suggested a simpler code: REPLACE(REPLACE(REPLACE(MyF... CHAR(10), ''), CHAR(13), ''), CHAR(9), '') I found that some string in the database have NewLine characters where they do not required. To remove them in T-SQL I wrote the following SQL script (TODO: write re-usable SP, also special option to remove NewLine characters from the end of the string) declare @NewLine char(2) set @NewLine=char(13)+char(10) update TableName set ColumnName =Replace(ColumnName ......

Differences between Visual Basic Trim function and String.Trim() method

Today I recognized that Visual Basic Trim function removes spaces only, but String.Trim() method removes all white space characters(see Remarks here) including newline and carriage return. The following C# sample confirms this: public void VBTrim_Test() { string str="string" + '\r' + '\n'; Debug.WriteLine(String.Form... of {0} is {1}", str,Microsoft.VisualBasic.S... str=Microsoft.VisualBasic.S... Debug.WriteLine(String.Form... VB trim length of {0} is {1}", ......

ASP.NET custom control HyperLinkWithImage

I've posted source code for the custom control that shows hyperlink and image next to each other that when clicked, will open the same URL. The standard WebControls.HyperLink shows text or image, but not both. ......

Calling __doPostBack in javascript

Update: There is an existing .Net Framework method Page.GetPostBackEventReference that emits client-side script that initiates postback and also provides a reference to the control that initiated the postback event. It is well described in MSDN article “Generating Client-Side Script for Postback“. So my function should call and in most cases GetPostBackEventReference can be used directly. Original Post: I've used a function to submit postback from my javascript by passing Id of the link server control ......

«November»
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910