Welcome to ASP.NET Guild
Monday, November 27, 2006
asp.net caching documentation
http://www.codersource.net/asp_net_caching.aspx
If you have any tips, tricks, articles, sample code that you think will be helpful to other ASP.NET developers email them to me at chrisw_88@hotmail.com and I will post them.
Friday, October 20, 2006
iis redirect wildcards
This link is a more comprehensive link showing the wildcards available
If you know of any tips, tricks, sample code that you feel will help other ASP.NET developers please email them to me at chrisw_88@hotmail.com and I will post them.
Thursday, October 05, 2006
asp.net 2.0 security
ASP.NET Security FAQ
ASP.NET Security setup article
Addison-Wesley - ASP.NET 2.0 Security Article
Tuesday, July 25, 2006
Flash and ASP.NET 2.0 double click issue (Click to activate control)
It appears that Microsoft released a security fix and this caused it.
The following article will show you a workaround for this. Basically
you are writing the object tag to the page using document.write in a
javascript file. Then calling the script file from the page.
Flash and 2.0 double click issue Link
https://tgaw.wordpress.com/2006/05/02/ms06-013-click-to-activate-and-use-this-control/
There is a free javascript library called swfobject.js that is available on google code that assists in fixing this and other issues with ie and flash.
http://code.google.com/p/swfobject/
If you have any additional tips, tricks etc that you would like me to post
to my blog, please email them to me at chrisw_88@hotmail.com
Monday, July 17, 2006
Flash in a form Fix - Using JavaScript
"briandunnington said on May 9, 2006 at 4:56 PM : "
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00002200.html
Place the following script before the flash object reference and be sure to change ShockwaveFlash1 to your flash file name:
<script type="text/javascript">
function ExternalInterfaceManager()
{
this.registerMovie = function(movieName)
{
if(!window.fakeMovies) window.fakeMovies = new Array();
window.fakeMovies[window.fakeMovies.length] = movieName;
}
this.initialize = function()
{
if(document.all)
{
if(window.fakeMovies)
{
for(i=0;i
window[window.fakeMovies[i]] = new Object();
}
window.onload = initializeExternalInterface;
}
}
}
}
function initializeExternalInterface()
{
for(i=0;i
var movieName = window.fakeMovies[i];
var fakeMovie = window[movieName];
var realMovie = document.getElementById(movieName);
for(var method in fakeMovie)
{
realMovie[method] = function() {flashFunction = "<invoke name=\"" + method.toString() + "\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments, 0) + "</invoke>";this.CallFunction(flashFunction);}
}
window[movieName] = realMovie;
}
}
</script>
<script type="">
var eim = new ExternalInterfaceManager();
eim.registerMovie("ShockwaveFlash1");
eim.registerMovie("ShockwaveFlash2");
eim.initialize();
</script>
If you have any tips you would like to share please email them to me at chrisw_88@hotmail.com
Friday, July 14, 2006
.NET Mail Links, FAQ
help you diagnose issues.
.NET 2.0
- http://www.systemnetmail.com/ (FAQ)
- http://www.codeproject.com/useritems/EmailApplication.asp (A good example)
.NET 1.1
If you have any additional links you would like me to add, please email them to me at
chrisw_88@hotmail.com
Tuesday, July 11, 2006
Dropdowns over flash or other controls in IE
Basically the issue is that select controls overlap other
controls and divs regardless of z-order. The solution is
to hide all of them on a page when this issue arises and then
reshow them after you are done with the div or flash.
Hide Select Menus JavaScript: http://www.shawnolson.net/a/1198/
If you have any tips you would like to share please email them to me at chrisw_88@hotmail.com
Tuesday, July 04, 2006
Flash Remoting Links
Below is a list of links related to Flash Remoting:
- Introduction to Flash Remoting with .NET
http://www.adobe.com/devnet/flashremoting/articles/intro_flremoting_net.html - Flash and .NET with FlashRemoting
http://www.codeproject.com/aspnet/FlashRemoting.asp - Integrating Macromedia Flash MX and Microsoft ASP.NET
http://www.dotnetjunkies.com/Tutorial/986D1568-2686-435A-855A-5A95F25FFC71.dcik - WebOrb - Competitors to Flash Remoting
http://www.themidnightcoders.com/weborb/ - Flash Remoting forum on Actionscript.org
http://www.actionscript.org/forums/forumdisplay.php3?f=46 - Flash Remoting and security
http://www.macromedia.com/devnet/mx/flashcom/security.html
http://webforums.macromedia.com/flash/categories.cfm?catid=250
http://forums.asp.net/thread/454811.aspx - Security issue with flash remoting and a web service
http://www.flash-remoting.com/notablog/home.cfm?newsid=14 - Flash Remoting and security (may not be valid since it is coming from the competition but something to ponder anyways.
http://webddj.sys-con.com/read/44905.htm
http://www.flash-remoting.com/notablog/home.cfm?newsid=14
http://www.markme.com/mesh/archives/000377.cfm
http://www.tomkitta.com/guides/flashMX2004.cfm#part17
If you have any more flash remoting links or other tips, tricks, code samples, etc that will help other ASP.NET developers please email them to me at chrisw_88@hotmail.com
Friday, June 30, 2006
Multiple pages accessing the same codebehind file in ASP.NET 2.0
The type 'xxxx' exists in both '...\v2.0.50727\Temporary\....xxx.dll' and '...\v2.0.50727\Temporary\...yyy.dll'
Rick Strahl's solution to this problem is to do a page reference instead of pointing both to the same source file. Eg. <%@ Reference Page="~/UploadItemPicture.aspx" %>
You can check out the full solution at:
http://odetocode.com/Blogs/scott/archive/2005/09/12/2186.aspx or
http://west-wind.com/weblog/posts/3016.aspx
Please note that there are other causes of this error message, such as conflicting object names in the same namespace.
Check out the full posting at http://www.cubido.net/Blog/tabid/176/EntryID/49/Default.aspxIn my case I had a prior
compiled version (a dll) of the web app itself in the bin directory, which is
not allowed any more. -> delete all compiled versions of all web applications
(the app itself and referenced web apps) from the bin directory !!If you have to
have the same
classname multiple times within your application (e.g a class
"DataAccess"
within each module subfolder in the app_code directory, you
could do the
following:1) Give each class a different namespace (e.g.
MODULENAME.DataAccess)2) Mark the classes as partial classes (!! this does not
work if the partial classes are spread accross different subfolders of the
app_code dir which are marked as codeSubDirectory in the web.config. The reason
is, that in this case, each subfolder results in a different assembly and
partial classes over multiple assemblies are not allowed. Also see my blog
entry
for creating multiple assemblies from the app_code directory
!!)
If you have any tips you would like to share please email them to me at chrisw_88@hotmail.com
Be one of the first to try Windows Live Mail. Windows Live Mail.
Friday, May 19, 2006
Creating Custom Web Controls (Server Controls)
- DotNetJunkies/Web Control Authoring
- Web Server Controls Templates
- GoDotNet - Custom Web Server Control Examples
If you have any more custom web control links to share please email them to me at
chrisw_88@hotmail.com
Wednesday, May 10, 2006
How To Change Master Pages Dynamically at runtime
ASPX:
@ Page MasterPageFile="~/MasterPage.master" Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div>
<asp:DropDownList ID="MasterSwitch" runat="server" AutoPostBack="true">
<asp:ListItem Text="Simple Layout" Value="MasterPage.master">asp:ListItem>
<asp:ListItem Text="Complex Style" Value="MasterPageComplex.master">asp:ListItem>
<asp<:DropDownList>
<div<>>
<asp<>:Content>
Codebeside:
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Default : System.Web.UI.Page
{
protected void Page_PreInit(object sender, EventArgs e)
{
switchMaster();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Session["MasterSwitch"] = this.MasterSwitch.UniqueID;
}
}
private void switchMaster()
{
if (IsPostBack)
{
// Get control that fire postback event
string eventTarget = Request.Form["__EVENTTARGET"];
if (String.IsNullOrEmpty(eventTarget))
return;
// At this stage we don't have control tree yet,
// so we'll use previosly saved control ID
string switchControlName = (string)Session["MasterSwitch"];
if (String.IsNullOrEmpty(switchControlName))
return;
if (String.Compare(eventTarget, switchControlName, true) != 0)
return;
setMaster(Request.Form[eventTarget]);
}
}
private void setMaster(string masterName)
{
if (String.IsNullOrEmpty(masterName))
return;
// In real implementation some logic to convert
// selected value into real MasterPage File Name should be here
if (String.Compare(this.MasterPageFile, masterName, true) != 0)
this.MasterPageFile = masterName;
}
}
If you have any additional tips, tricks etc that you would like me to post to my blog, please email them to me at chrisw_88@hotmail.com
Wednesday, March 29, 2006
Multilingual characters in web.config
http://blogs.imason.com/chris.chapman/archive/2005/10/05/1833.aspx
If you have any additional tips, tricks etc that you would like me to post to my blog, please email them to me at chrisw_88@hotmail.com
Monday, March 20, 2006
Common Solution Links
If you have any suggestions for links to place here please email them to me at chrisw_88@hotmail.com
Wednesday, March 08, 2006
CTW ASP.NET Grid articles
http://www.gridviewgirl.com/GridViewGirl/articles.aspx
If you have any additional tips, tricks etc that you would like me to post to my blog, please email them to me at chrisw_88@hotmail.com
Monday, February 06, 2006
GridView Tips and Tricks
Formatting data using DataFormatString
EXAMPLE:
I was having an issue with it not applying my format. If it doesn’t work its one of the 3 key reasons below.For me I did not have HtmlEncode set to false.
The key properties are as follows:
o HtmlEncode = "False" ensures that the formatting is applied when displaying the date field. Without it, the formatting doesn't apply for some unknown reason.
o ApplyFormatInEditMode = "True" ensures that the DataFormatString is also applied when you change to the Edit mode. Without it, the formatting is ignored in Edit mode.
Introduction
This blog is designed to contain various Tips and Tricks to help you with your ASP.NET 2.0
development. Since there are a lot of changes from ASP.NET 1.1 to 2.0 hopefully this will
help you with some of the pot-holes found during transition from 1.1 to 2.0 as well.
If you know any Tips or Tricks I can add to this blog please email them to me at chrisw_88@hotmail.com