Wednesday, October 26, 2005

Login Control :: Password Recovery :: How-To send emails

that the emails issues are working fine, you will need to adapt the web.config with the following element:

≶blockquote>≶strong>≶system.net>
≶mailsettings>
≶smtp deliverymethod="Network">
≶network host="smtp.xyz.com" from="roni.schuetz@hotmail.com">
≶/smtp>
≶/mailsettings>
≶/SYSTEM.NET>≶/strong>≶/blockquote>

Asp.Net 2.0 Themes und URL-Rewriting

this is a well know problem with the relativ path's. Themes are using by default relativ Paths. the workaround is to use the follwoing method:

the reg-ex which is used here: ""

Notice: its just match css-links like in the sample!!!!

public override void Write(byte[] buffer, int offset, int count){string strBuffer = System.Text.UTF8Encoding.UTF8.GetString(buffer, offset, count);
// ---------------------------------// Wait for the closing tag// ---------------------------------Regex eof = new Regex("", RegexOptions.IgnoreCase);
if (!eof.IsMatch(strBuffer)){responseHtml.Append(strBuffer);}else{responseHtml.Append(strBuffer);
string finalHtml = responseHtml.ToString();Regex re = null;
// Css-Files auf die absolute Client-URL mappenre = new Regex("", RegexOptions.IgnoreCase);finalHtml = re.Replace (finalHtml, new MatchEvaluator (CssMatch));
// Write the formatted HTML backbyte[] data = System.Text.UTF8Encoding.UTF8.GetBytes(finalHtml);
responseStream.Write(data, 0, data.Length);}
}
private string CssMatch(Match m){return m.ToString().Replace(m.Groups[1].Value, ConfigurationManager.AppSettings["ApplicationRoot"] + m.Groups[1].Value);}

Source: http://blogs.dotnetgerman.com/thomas/PermaLink,guid,f211331c-b175-4a25-8958-ece6bc6d364a.aspx

Workaround for ASP.NET 2.0 bug: LoadControl gives an exception in a TemplateControl

[since june CTP 2005 this bug is not available anymore]

http://blogs.infosupport.com/raimondb/archive/2005/04/29/203.aspx?Pending=true

ASP.NET - Relative Url's

ASPX:


HTML Client output:

somewhere else, not inside the control you can use the ResolveUrl("~/bilder/spacer.gif");

Masterpages per Browser

yes its possible to generate for each differnent browser its own MasterPage.

<%@ Page Language="C#"
AutoEventWireup="true"
CodeFile="Default.aspx.cs"
Inherits="_Default"
ie:MasterPageFile="~/MasterPage_IE.master"
mozilla:MasterPageFile="~/MasterPage_Firefox.master"
%>

Shared Cache - .Net Caching made easy

All information about Shared Cache is available here: http://www.sharedcache.com/. Its free and easy to use, we provide all sources at codeplex.

Facebook Badge