Tuesday, May 31, 2005

Test for AlphaNumeric in C#

public bool IsAlphaNumeric(String str){
Regex regexAlphaNum=new Regex("[^a-zA-Z0-9]");
return !regexAlphaNum.IsMatch(str);
}

Friday, May 27, 2005

To create a Sharepoint web app with Visual Studio.Net

Map a drive (S:) to the sharepoint server at "C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS".
Create a new project at http://sharepointserver/_layouts/WebAPP.
Visual Studio will fail. Change the path to S:\WebApp and retry.
Visual STudio will complain about permission problems and the need to create an application at the server. Just click okay all the way through.
Go to the sharepoint server. Start the IIS management applet, and browse to the WebApp folder just created. Right-click and select properties. Create an application. Select the Sharepoint application pool.
Restart IIS using iisreset.
Go back to Visual Studio and add reference to Microsoft.SharePoint.dll.
Within each code file, add the following:

using Microsoft.SharePoint;using Microsoft.SharePoint.WebControls;using Microsoft.SharePoint.Utilities;

Wednesday, May 25, 2005

T-Mobile GPRS UK Settings

Session Type Continuous/Permanent
Security Off
Gateway Address 149.254.001.010
Authentication Normal
Access Point Name general.t-mobile.uk
Port number 9201
Mail server (SMTP) smtp.t-email.co.uk
Username user
Password one2one
Home Page http://wap.t-mobile.co.uk/
http://www.t-zones.co.uk

Friday, May 6, 2005

Send mail in ASP.NET

MailMessage oMsg = new MailMessage();
oMsg.From = "me@MyServer.Net";
oMsg.To = "you@YourServer.Net";
oMsg.Cc = "him@HisServer.Net";
oMsg.Subject = "Test";oMsg.Body = "This is only a test";
oMsg.Attachments.Add(new MailAttachment("c:\temp\Test.txt"));
SmtpMail.Send(oMsg);
 
Jeffrey Ting Jeffrey Ting on Facebook Jeffrey Ting on Spock Jeffrey Ting on Plaxo Jeffrey Ting on Spoke Jeffrey Ting on LinkedIn