Wednesday, November 09, 2005 12:28:13 AM UTC :: Filed Under ASP.NET

In a quest to make my client web site’s XHTML compliant yet still highly configurable by my client, I went on a search to replace the free RichTextBox editor I was using in favor of one that supported XHTML.   Lucky for me, I found one that did that and much more: FCKeditor.



FCKeditor is on open-source rich textbox editor that works on nearly every major platform.  To use it in an ASP.NET web page, as a user control, there is an additional download which provides the necessary .dll.

Configuring the textbox was relatively easy.  The only issue I had was trying to get the file browser to work. The file browser is a very cool tool that allows the user to browser to a specific folder on the hard drive and upload or link to files and images to put into the content window.  This saves the end user from having direct access to the web server to upload files and then having to guess at the URL to those files to create links to them.

The issue I had related to the path of the folder where users can store his files.  That path is different on my workstation than it is on the live web server because my workstation is running Windows XP and each web site is in a virtual directory where as the live server is a Windows 2003 Server and each web site is in its own IIS site. 

For my workstation, I defined the file upload folder as:

<appSettings file="user.config">
 <add key="FCKeditor:UserFilesPath" value="/MYVIRTUALSITE/userfiles" />
</appSettings>

… where as I had to define the path as follows on the live server:

<appSettings file="user.config">
 <add key="FCKeditor:UserFilesPath" value="/userfiles" />
</appSettings>

Note that the path must start with a forward slash “/” and not a “~/”.

Tuesday, November 08, 2005 8:34:41 PM UTC :: Filed Under ASP.NET

Free ASP.NET hosting for Christians… Does it get any better than this?

http://www.christianasp.net/Hosting.aspx

Tuesday, November 08, 2005 5:40:00 PM UTC :: Filed Under ASP.NET

Although this type of toolbar has been around for a long time for the FireFox browser, the IE Team at Microsoft has finally gotten around to creating a Developer Toolbar add-in for IE.

Wednesday, November 02, 2005 8:53:15 PM UTC :: Filed Under ASP.NET

Sample comparing two dates:

Dim t1 As String = DateTime.Parse("3:30 PM").ToString("t")
Dim t2 As String = DateTime.Now.ToString("t")
If DateTime.Compare(DateTime.Parse(t1), DateTime.Parse(t2)) < 0 Then 
     Response.Write(t1.ToString() & " is < than " & t2.ToString())
Else 
     Response.Write(t1.ToString() & " is > than " & t2.ToString())
End If

Sample comparing two moments in time:

Dim adate As DateTime = DateTime.Parse("06/24/2003") 
Dim bdate As DateTime = DateTime.Parse("06/28/2003")
Dim ts As New TimeSpan(bdate.Ticks - adate.Ticks)
Response.Write(ts.TotalDays & "<br>")
Response.Write(ts.TotalHours & ":" & ts.TotalMinutes & _
        ":" & ts.TotalSeconds & ":" & ts.TotalMilliseconds) 
Sunday, October 30, 2005 5:01:10 AM UTC :: Filed Under ASP.NET

When using a GridView in ASP.NET 2.0, note that you must set HtmlEncode = False in addition to setting the DataFormatString or else the formatting will not work:

image0011.png

Sunday, October 30, 2005 3:15:06 AM UTC :: Filed Under ASP.NET

Because of the cost and portability, I had a tendency to use Microsoft Access databases as the back-end for many of my web sites.  Microsoft recently released Visual Studio 2005 which includes SQL Express 2005.  SQL Express is designed to be used in-place of Access for low volume web sites.

With this in-mind, my first thought was, “How to I upsize my Access 2000 databases to SQL Express 2005?”  It’s surprisingly easy.

How to Upsize an Access 2000 Database to an SQL Express 2005 Database

1. Open the Access database you wish to up-size.
 
2. Select Tools > Database Utilities > Upsizing Wizard



3. Select Create new database and then Next >
 
4. This is probably the hardest part.  The instance of your SQL Express database won’t show-up in the database dropdown list.   For the name of your SQL Server, enter MACHINENAME\SQLExpress or .\SQLExpress.  The former worked for me:



5. Make sure you name the database, click Next >, and the rest is the same as it’s always been.

If you find that Access can’t connect to the SQL Express database, this FAQ might be helpful:

FAQ: How to connect to SQL Express from "downlevel clients"(Access 2003, VS 2003, VB 6, etc(basically anything that is not using .Net 2.0 or the new SQL Native Client))

You’ll also likely want to bookmark the Microsoft SQL Express Blog to stay informed.

Navigation
On this page....
Search
Archives
<November 2005>
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910
Categories
Contact me
Send mail to the author(s) Contact Todd M. Taylor