May 2005 - Posts

IIS 7
Tuesday, May 31, 2005 5:48 AM
http://www.zdnet.com.au/news/software/0,2000061733,39194313,00.htm
by riaan | with no comments
The Microsoft Millionaires
Monday, May 30, 2005 5:51 AM

http://www.nytimes.com/2005/05/29/business/yourmoney/29millionaire.html?ex=1118030400&en=3c791eafd88178a1&ei=5070

by riaan | with no comments
Dropdownlist, Frames And IE 6
Friday, May 27, 2005 5:59 AM

After 4 hours of figuring out why my ASP.Net page disappear into white space after selecting an item in a dropdown list I have finally found out that IE 6 have some strange bug regarding dropdown lists and Frames.

 Here's how to solve it.

HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
    <HEAD>
        <title>DropDownListError</title>
        <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
        <meta name="CODE_LANGUAGE" Content="C#">
        <meta name="vs_defaultClientScript" content="JavaScript">
        <meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5";>
        <script language=javascript>
        function check()
        {
            if(document.all("hdFlag").value == "1")
            {
                document.all("lstMain").disabled = true;
            }
        }
    
        function setflag()
        {
            document.all("hdFlag").value = "1";
                
        }
        </script>
    </HEAD>
    <body>
        <form id="Form1" method="post" runat="server">
            <table width="500" align="center">
                <tr>
                    <td>
                        <asp:Label id="lblMessage" runat="server"></asp:Label><input
type="hidden" id="hdFlag" runat="server" value="0" NAME="hdFlag"></td>
                </tr>
                <tr>
                    <td>
                        <asp:DropDownList id="lstMain" runat="server" AutoPostBack="True">
                            <asp:ListItem Value="ItemA" Selected="True">ItemA</asp:ListItem>
                            <asp:ListItem Value="ItemB">ItemB</asp:ListItem>
                            <asp:ListItem Value="ItemC">ItemC</asp:ListItem>
                            <asp:ListItem Value="ItemD">ItemD</asp:ListItem>
                        </asp:DropDownList>
                        <select ></select>
                    </td>
                </tr>
            </table>
        </form>
    </body>
</HTML>

 

Code Behind Class

public class DropDownListError : System.Web.UI.Page
    {
        protected System.Web.UI.WebControls.DropDownList lstMain;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hdFlag;
        protected System.Web.UI.WebControls.Label lblMessage;
    
        private void Page_Load(object sender, System.EventArgs e)
        {
            lstMain.Attributes.Add("onchange","setflag();");
            lstMain.Attributes.Add("onmousedown","check();");
        }

        #region Web Form Designer generated code
        override protected void OnInit(EventArgs e)
        {
            InitializeComponent();
            base.OnInit(e);
        }
        
        private void InitializeComponent()
        {
            this.lstMain.SelectedIndexChanged += new
System.EventHandler(this.lstMain_SelectedIndexChanged);
            this.Load += new System.EventHandler(this.Page_Load);

        }
        #endregion

        private void lstMain_SelectedIndexChanged(object sender, System.EventArgs
e)
        {
            System.Threading.Thread.Sleep(1000*4);
            lblMessage.Text = "SelectIndex is changed to " + lstMain.SelectedIndex +
"at " + DateTime.Now.ToLongTimeString();
            hdFlag.Value = "0";
        }
    }

What you basically doing here is forcing client side JavaScript events to set a flag on submission of the page. The script check for the flag, disables the dropdown box, sleeps for a few seconds, does your code change and then reloads the page. Why this works? Don’t know.

http://www.dotnet247.com/247reference/msgs/40/204635.aspx

 

 

 

by riaan | with no comments
Dependency Redirecting
Friday, May 27, 2005 5:50 AM

We all get into the position where we have either not set “copy local” to true, or we have the wrong versions of dependant dll's with us during an installation at a client. So, what do you do? You simply do a dependency redirect.  Dependency redirect is a piece of markup that goes into your config file and tells your application to rather use another version of the assemblies it is looking for. Below follows an example

The following example shows how to redirect one assembly version to another

<configuration>

   <runtime>

      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

         <dependentAssembly>

            <assemblyIdentity name="myAssembly"

                              publicKeyToken="32ab4ba45e0a69a1"

                              culture="neutral" />

            <bindingRedirect oldVersion="1.0.0.0"

                             newVersion="2.0.0.0"/>

         </dependentAssembly>

      </assemblyBinding>

   </runtime>

</configuration>

by riaan | with no comments
Threat Modeling For ASP.NET
Thursday, May 26, 2005 5:48 AM

 

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/tmwa.asp

Web Seminar Archive
Wednesday, May 25, 2005 6:23 AM
http://main.placeware.com/demos/web_seminar_archive.cfm
by riaan | with no comments
Processing Long Running Tasks using Async Handlers and XMLHTTP With ASP.NET
Wednesday, May 25, 2005 5:49 AM

Worth the read.

http://www.codeproject.com/aspnet/asynctransactionhandler.asp

by riaan | with no comments
MSN Virtual Earth
Wednesday, May 25, 2005 5:47 AM

read more here:

http://blog.searchenginewatch.com/blog/050523-125208

or

http://www.slashdot.org

 

by riaan | with no comments
What's New for Developers in Windows Mobile 5.0
Wednesday, May 25, 2005 5:46 AM
http://msdn.microsoft.com/mobility/default.aspx?pull=/library/en-us/dnppcgen/html/whatsnew_wm5.asp
by riaan | with no comments
New SA Search Engine
Tuesday, May 24, 2005 5:48 AM

For those of you who do not know this yet, SA has a new search engine.

http://www.funnel.co.za

by riaan | with no comments
Using Javascript with ASP.NET
Tuesday, May 17, 2005 5:45 AM

After reading this article, I still prefer keeping the Javascript in a seperate .js file and calling the methods client side.

http://msdn.microsoft.com/asp.net/articles/client/default.aspx?pull=/library/en-us/dnaspp/html/aspnet-usingjavascript.asp

Gates announce next version of mobile OS
Wednesday, May 11, 2005 5:48 AM
http://news.zdnet.com/2100-9590_22-5701531.html?tag=nl.e589
by riaan | with no comments
ASP.NET: The pro's and con's of cookies
Tuesday, May 10, 2005 5:52 AM

Reasons why and why not to use cookies to keep state.

 

http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/html/cookieless.asp

 

 

by riaan | with no comments
Meet the Head of Microsoft's Linux Lab
Monday, May 09, 2005 5:53 AM

http://news.yahoo.com/news?tmpl=story&u=/zd/20050506/tc_zd/151451

 

by riaan | with no comments
A Note on LifeWorks
Thursday, May 05, 2005 5:46 AM

The LifeWorks set of articles is going to be moved into a newsletter format. I'm removing them from this blog, to keep the writings in the blog mainly development orientated. If you are interested in receiving life works, you can mail me: riaan.snyders@gmail.com

by riaan | with no comments
More Posts Next page »