Issue 1: Progress of Windows 10 download doesn't progress from 0% or stuck at some percent
Resolution: Make sure to free 5GB of space in the C: drive(windows drive) and start again with Media Creation Tool
Issue 2: Encounter the error "Setup has been failed to initialize the working directory" while installing the Windows 10
Resolution: Move/Copy $Windows.~WS directory from C: drive(Windows drive) to an empty USB stick(Pen drive) and run setupprep.exe from the folder "$Windows.~WS\Sources\Windows\sources" from Pendrive
Notes:
- The resolutions are applicable to both Laptops and Touchpads/ Tablets
- Do not re-run the Media Creation Tool, if it has already passed the downloading step. It will erase previously downloaded bits and download again. Downloaded bits/ installers can be found in the folder $Windows.~WS
Wednesday, August 5, 2015
Tuesday, November 25, 2008
Using Server Tags in External JS files
Context: Accessing Controls of a Content Page in external Javascript files using server tags like <%= <ControlID>.ClientID %>
ASP.NET compiler generates a UniqueID for each of the control declared. When a control is declared in Content Page of a Master Page say TextBox1, compiler will generate a UniqueID for TextBox like ctl00_ContentPlaceHolder1_TextBox1 i.e. ctl<ControlIndex>_<ContentPlaceHolderID>_<TextBoxID>. To access this control in Javascript, you can hardcode 'ctl00_ContentPlaceHolder1_' as a prefix to actual control id. But, it is not a good practice to hardcode as adding another ContentPlaceHolder/Control before to 'ContentPlaceHolder1' in Master Page will change the UniqueID. Also, if you change the ID of ContentPlaceHolder, you need to go back to all places to change the hardcoded control id.
To overcome this, you can use server tags to get the client id of the control at runtime like '<%= <ControlID>.ClientID %>' for example '<%=TextBox1.ClientID%>' in ASPX page.
When you move this code to an external JS file, all of a sudden your code stops working as expected and cases may throw JS errors.
ASP.NET compiler will compile the code inside server tags <% %> specified with in the aspx page and (#)binds/ (=)assigns /replaces<% %> tags with the compiled code and renders compiled ASPX content in browser following the ASP.NET page life cycle.
ASP.NET compiler will not compile any external Java Script file that is refered using <SCRIPT SRC>. It is the ability or one of the job of the browser to Fetch, Load ,Compile and Execute the JS file. So, JavaScript compiler(which is embedded in browser) will treat any code with in server tags inside JS file as a normal JS code and compiles accrodingly/inline to the JavaScript language syntax. If the server tags are with in single/double quotes like '<%= %>' or "<%# %>", compiler will treat it as a string.
In ajax enabled ASP.NET, JS files will be refered in any of the following ways
<script type="text/javascript" src=="~/Scripts/Script1.js" />
[OR]
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference NotifyScriptLoaded="true" Path="~/Scripts/Script1.js" />
</Scripts>
</asp:ScriptManager>
Any code (like control ids) that has to be used in generic JavaScripts(refered across many pages) has to be passed from the ASP.NET [aspx(.cs)] compiled layer to the external JS files as parameters
From .CS
-To add JavaScript method to a Button OnClick event,
ValidateButton.Attributes.Add("onclick","javascript:return Validate('"+StartDateTextBox.ClientID +"','"+EndDateTextBox.ClientID +"');");
- Adding client script to OnUpdating event of UpdatePanelAnimationExtender
AjaxControlToolkit.Animation OnUpdatedAnimation=new AjaxControlToolkit.Animation();
OnUpdatedAnimation.Name = "ScriptAction";
OnUpdatedAnimation.Properties.Add("Script","onUpdated('" + CustomersGridView.ClientID + "');");
CreateRequestUPAnimation.OnUpdated.Children.Add(OnUpdatedAnimation);
References...
http://www.jsworkshop.com/articles/02scriptsrc.html
http://javascript.crockford.com/script.html
ASP.NET compiler generates a UniqueID for each of the control declared. When a control is declared in Content Page of a Master Page say TextBox1, compiler will generate a UniqueID for TextBox like ctl00_ContentPlaceHolder1_TextBox1 i.e. ctl<ControlIndex>_<ContentPlaceHolderID>_<TextBoxID>. To access this control in Javascript, you can hardcode 'ctl00_ContentPlaceHolder1_' as a prefix to actual control id. But, it is not a good practice to hardcode as adding another ContentPlaceHolder/Control before to 'ContentPlaceHolder1' in Master Page will change the UniqueID. Also, if you change the ID of ContentPlaceHolder, you need to go back to all places to change the hardcoded control id.
To overcome this, you can use server tags to get the client id of the control at runtime like '<%= <ControlID>.ClientID %>' for example '<%=TextBox1.ClientID%>' in ASPX page.
When you move this code to an external JS file, all of a sudden your code stops working as expected and cases may throw JS errors.
ASP.NET compiler will compile the code inside server tags <% %> specified with in the aspx page and (#)binds/ (=)assigns /replaces<% %> tags with the compiled code and renders compiled ASPX content in browser following the ASP.NET page life cycle.
ASP.NET compiler will not compile any external Java Script file that is refered using <SCRIPT SRC>. It is the ability or one of the job of the browser to Fetch, Load ,Compile and Execute the JS file. So, JavaScript compiler(which is embedded in browser) will treat any code with in server tags inside JS file as a normal JS code and compiles accrodingly/inline to the JavaScript language syntax. If the server tags are with in single/double quotes like '<%= %>' or "<%# %>", compiler will treat it as a string.
In ajax enabled ASP.NET, JS files will be refered in any of the following ways
<script type="text/javascript" src=="~/Scripts/Script1.js" />
[OR]
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference NotifyScriptLoaded="true" Path="~/Scripts/Script1.js" />
</Scripts>
</asp:ScriptManager>
Any code (like control ids) that has to be used in generic JavaScripts(refered across many pages) has to be passed from the ASP.NET [aspx(.cs)] compiled layer to the external JS files as parameters
From .CS
-To add JavaScript method to a Button OnClick event,
ValidateButton.Attributes.Add("onclick","javascript:return Validate('"+StartDateTextBox.ClientID +"','"+EndDateTextBox.ClientID +"');");
- Adding client script to OnUpdating event of UpdatePanelAnimationExtender
AjaxControlToolkit.Animation OnUpdatedAnimation=new AjaxControlToolkit.Animation();
OnUpdatedAnimation.Name = "ScriptAction";
OnUpdatedAnimation.Properties.Add("Script","onUpdated('" + CustomersGridView.ClientID + "');");
CreateRequestUPAnimation.OnUpdated.Children.Add(OnUpdatedAnimation);
References...
http://www.jsworkshop.com/articles/02scriptsrc.html
http://javascript.crockford.com/script.html
Saturday, November 15, 2008
Rounded Corners
Rounded Corners using only CSS
Design 1:

<div style="width: 50%;">
<asp:Panel ID="Panel1" runat="server">
<b class="roundtop"><b class="g_round1"></b><b class="g_round2"></b><b class="g_round3"></b><b class="g_round4">
</b></b>
<div class="gradientheader" id="Div1" >
<asp:Label ID="Label2" runat="server" Width="100%">Details...</asp:Label>
</div>
<b class="roundbottom"><b class="noround"></b></b>
</asp:Panel>
<asp:Panel ID="Panel2" runat="server" CssClass="contentborder">
<p>
Your content goes here...
</p>
</asp:Panel>
</div>
Design 2:

<div style="width: 50%;">
<asp:Panel ID="Panel3" runat="server">
<b class="roundtop"><b class="g_round1"></b><b class="g_round2"></b><b class="g_round3">
</b><b class="g_round4"></b></b>
<div class="gradientheader" id="Div2" style="margin: 0 -1px;">
<asp:Label ID="Label3" runat="server" Width="100%">Details...</asp:Label>
</div>
<b class="roundbottom"><b class="noround"></b></b>
</asp:Panel>
<asp:Panel ID="Panel4" runat="server" CssClass="contentnoborder">
<p>
To communicate with Microsoft's Web Development Customers, to know as much as I
can about all web development technologies, those made by Microsoft and those made
by everyone else, and to communicate from the world to the Web development product
teams and from the web development product teams to the development community.
</p>
</asp:Panel>
<b class="roundbottom"><b class="g_round4"></b><b class="g_round3"></b><b class="g_round2">
</b><b class="g_round1"></b></b>
</div>
Design 3:

<div style="width: 50%;">
<asp:Panel ID="Panel5" runat="server">
<b class="roundtop"><b class="g_round1"></b><b class="g_round2"></b><b class="g_round3">
</b><b class="g_round4"></b></b>
<div class="gradientheader" id="Div3" style="margin: 0 -1px;">
<asp:Label ID="Label4" runat="server" Width="100%">Details...</asp:Label>
</div>
<b class="roundbottom"><b class="noround"></b></b>
</asp:Panel>
<asp:Panel ID="Panel6" runat="server" CssClass="contentnoborder">
<p>
To communicate with Microsoft's Web Development Customers, to know as much as I
can about all web development technologies, those made by Microsoft and those made
by everyone else, and to communicate from the world to the Web development product
teams and from the web development product teams to the development community.
</p>
</asp:Panel>
<b class="roundbottom"><b class="round4"></b><b class="round3"></b><b class="round2">
</b><b class="round1"></b></b>
</div>
CSS Styles:
CSS classes are defined in the following post
http://vrreddy.blogspot.com/2008/11/collapsible-panel-rounded-corners.html
Design 1:

<div style="width: 50%;">
<asp:Panel ID="Panel1" runat="server">
<b class="roundtop"><b class="g_round1"></b><b class="g_round2"></b><b class="g_round3"></b><b class="g_round4">
</b></b>
<div class="gradientheader" id="Div1" >
<asp:Label ID="Label2" runat="server" Width="100%">Details...</asp:Label>
</div>
<b class="roundbottom"><b class="noround"></b></b>
</asp:Panel>
<asp:Panel ID="Panel2" runat="server" CssClass="contentborder">
<p>
Your content goes here...
</p>
</asp:Panel>
</div>
Design 2:

<div style="width: 50%;">
<asp:Panel ID="Panel3" runat="server">
<b class="roundtop"><b class="g_round1"></b><b class="g_round2"></b><b class="g_round3">
</b><b class="g_round4"></b></b>
<div class="gradientheader" id="Div2" style="margin: 0 -1px;">
<asp:Label ID="Label3" runat="server" Width="100%">Details...</asp:Label>
</div>
<b class="roundbottom"><b class="noround"></b></b>
</asp:Panel>
<asp:Panel ID="Panel4" runat="server" CssClass="contentnoborder">
<p>
To communicate with Microsoft's Web Development Customers, to know as much as I
can about all web development technologies, those made by Microsoft and those made
by everyone else, and to communicate from the world to the Web development product
teams and from the web development product teams to the development community.
</p>
</asp:Panel>
<b class="roundbottom"><b class="g_round4"></b><b class="g_round3"></b><b class="g_round2">
</b><b class="g_round1"></b></b>
</div>
Design 3:

<div style="width: 50%;">
<asp:Panel ID="Panel5" runat="server">
<b class="roundtop"><b class="g_round1"></b><b class="g_round2"></b><b class="g_round3">
</b><b class="g_round4"></b></b>
<div class="gradientheader" id="Div3" style="margin: 0 -1px;">
<asp:Label ID="Label4" runat="server" Width="100%">Details...</asp:Label>
</div>
<b class="roundbottom"><b class="noround"></b></b>
</asp:Panel>
<asp:Panel ID="Panel6" runat="server" CssClass="contentnoborder">
<p>
To communicate with Microsoft's Web Development Customers, to know as much as I
can about all web development technologies, those made by Microsoft and those made
by everyone else, and to communicate from the world to the Web development product
teams and from the web development product teams to the development community.
</p>
</asp:Panel>
<b class="roundbottom"><b class="round4"></b><b class="round3"></b><b class="round2">
</b><b class="round1"></b></b>
</div>
CSS Styles:
CSS classes are defined in the following post
http://vrreddy.blogspot.com/2008/11/collapsible-panel-rounded-corners.html
Subscribe to:
Posts (Atom)