http://www.readol.net/books/computer/dotnet/A.First.Look.At.ASP.Dot.NET.v.2.0/0321228960_ch04lev1sec1.html
Wednesday, September 21, 2005
Simon Evans' Blog : Data binding to objects using the ObjectDataSource control in ASP.net 2.0
Databinding in ASP.NET 2.0 using GridView and ObjectDataSource
Nice article. Easy to read and useful info.
Nice article. Easy to read and useful info.
Tuesday, September 20, 2005
ASP.NET 2.0 Page Lifecycle methods
Source:
ASP.NET 2.0 Internals
ASP.NET 2.0 Internals
| Method | Active |
| Constructor | Always |
| Construct | Always |
| TestDeviceFilter | Always |
| AddParsedSubObject | Always |
| DeterminePostBackMode | Always |
| OnPreInit | Always |
| LoadPersonalizationData | Always |
| InitializeThemes | Always |
| OnInit | Always |
| ApplyControlSkin | Always |
| ApplyPersonalization | Always |
| OnInitComplete | Always |
| LoadPageStateFromPersistenceMedium | PostBack |
| LoadControlState | PostBack |
| LoadViewState | PostBack |
| ProcessPostData1 | PostBack |
| OnPreLoad | Always |
| OnLoad | Always |
| ProcessPostData2 | PostBack |
| RaiseChangedEvents | PostBack |
| RaisePostBackEvent | PostBack |
| OnLoadComplete | Always |
| OnPreRender | Always |
| OnPreRenderComplete | Always |
| SavePersonalizationData | Always |
| SaveControlState | Always |
| SaveViewState | Always |
| SavePageStateToPersistenceMedium | Always |
| Render | Always |
| OnUnload | Always |
Friday, September 16, 2005
Microsoft testing practises by Scott Guthrie
Scott Guthrie explains how his team develops and test ASP.NET 2.0
More details on Testing ASP.NET 2005
Scott Guthrie:
...
We currently have approximately 1.4 testers for every 1 developer.
...
Tracking Bugs
Wednesday, September 14, 2005
Friday, June 24, 2005
How to fix problem with access to application log from ASP.NET
How to fix problem with access to application log from ASP.NET
If you get error:
"Requested registry access is not allowed"
during "EventLog.WriteEntry" operation, then do this:
1) Create win application which will create Event Source for application log:
EventLog.CreateEventSource
Example:
=====
private void TestForm_Load(object sender, System.EventArgs e)
{
System.Diagnostics.EventLog.CreateEventSource("LogName", "Application");
}
=====
2) You must have Administrator's privileges on the computer which will be used as Web Server (your ASP.NET code will log into Application log of this computer).
3) Execute "EventLog.CreateEventSource" piece of code.
4) Your Web-application must use only this "LogName" source in "EventLog.WriteEntry" method call.
If you get error:
"Requested registry access is not allowed"
during "EventLog.WriteEntry" operation, then do this:
1) Create win application which will create Event Source for application log:
EventLog.CreateEventSource
Example:
=====
private void TestForm_Load(object sender, System.EventArgs e)
{
System.Diagnostics.EventLog.CreateEventSource("LogName", "Application");
}
=====
2) You must have Administrator's privileges on the computer which will be used as Web Server (your ASP.NET code will log into Application log of this computer).
3) Execute "EventLog.CreateEventSource" piece of code.
4) Your Web-application must use only this "LogName" source in "EventLog.WriteEntry" method call.
Thursday, June 23, 2005
SMTP Authentication in ASP.NET
Do you want to send email in ASP.NET and your SMTP server requires SMTP authentication?
Here is the code to do that:
=======================
public static void SendMail(
string mailTo,
string mailFrom,
string mailSubject,
string mailBody,
string mailCc,
string mailBcc,
string smtpServer,
string userName,
string password)
{
System.Web.Mail.MailMessage mailMessage = new System.Web.Mail.MailMessage();
mailMessage.From = mailFrom;
mailMessage.To = mailTo;
mailMessage.Subject = mailSubject;
mailMessage.Body = mailBody;
mailMessage.Cc = mailCc;
mailMessage.Bcc = mailBcc;
mailMessage.BodyFormat = System.Web.Mail.MailFormat.Text;
const int cdoBasic = 1;
const int cdoSendUsingPort = 2;
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", cdoBasic);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", userName);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", password);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", cdoSendUsingPort);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", smtpServer);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout", 10);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", 25);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", false);
System.Web.Mail.SmtpMail.Send(mailMessage);
}
=======================
Original snippet is from here:
SMTP Authentication in ASP.NET
Here is the code to do that:
=======================
public static void SendMail(
string mailTo,
string mailFrom,
string mailSubject,
string mailBody,
string mailCc,
string mailBcc,
string smtpServer,
string userName,
string password)
{
System.Web.Mail.MailMessage mailMessage = new System.Web.Mail.MailMessage();
mailMessage.From = mailFrom;
mailMessage.To = mailTo;
mailMessage.Subject = mailSubject;
mailMessage.Body = mailBody;
mailMessage.Cc = mailCc;
mailMessage.Bcc = mailBcc;
mailMessage.BodyFormat = System.Web.Mail.MailFormat.Text;
const int cdoBasic = 1;
const int cdoSendUsingPort = 2;
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", cdoBasic);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", userName);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", password);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", cdoSendUsingPort);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", smtpServer);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout", 10);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", 25);
mailMessage.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", false);
System.Web.Mail.SmtpMail.Send(mailMessage);
}
=======================
Original snippet is from here:
SMTP Authentication in ASP.NET
Subscribe to:
Posts (Atom)