It's a great addons for track size of Viewstate for your Web Application.
Link: http://www.kirkov.dk/projects/firefox/viewstatesize
Very helpful for me.
....with a "Catastrophic Failure" error message....
For my fortune the solution was to restart Application Pool.
I'm studing for MCPD exam from the training kit book and I get this link on page 227
http://thedailywtf.com/Articles/Journey_to_the_Center_of_the_Database.aspx
It's a very funny story and a very funny site.
As a developer every day I find myself in situations where I have to write different methods for purposes of any kind. Generally, I write methods that take into one or more input parameters and return a particular result
Problems arise when my colleagues use the methods that I write. In particular, the biggest problems occur when they are specified in input values that are not valid for the execution of method.
Ok. I know that I can test each parameter before the execution of the real first instruction but it's a very frustration for a developer like me.
I think that can be nicely to have a mode for define at syntax level a constraint for a parameter of a method.
Something like :
<BetweenContraint(i,0,100)> _
Public Function TakeIntegerBetween0And100(ByVal i As Integer)
There is already something like this or I invented the wheel?
I know only looking for on Google or with a comment of some blog reader.
I have got Microsoft Usb Key during presentation of new Microsoft products in Catania (Sicily - Italy) last 18 March.
It's a 2 GB memory. I tried to use it with Ready Boost feature of Windows Vista but does not work.
Tonight I have intalled Windows Live Writer. It's a great tools for write some posts on my blog.
I promise to me to write some content on next week...:-P
Problem:
If you have a server control like Label or Image with a long name ID attribute when it's render as html the attribute ID is render on HTML output. If you have a lot of this controls on a web page this can introduce an overhead.
Solution:
The first solution is to remove the ID on control. Like this :
<asp:Label runat="server" Text="Salvo" ></asp:Label>
It work...but you can't use designer with visual studio because visual studio don't know the name of your label.
Then...this is not a good solution .
The second solution is to set ID with nothing (or null for C# programmers) at PreRender stage. Like this :
<script runat="server">
Protected Sub DeleteID(ByVal sender As Object, ByVal e As System.EventArgs)
If TypeOf sender Is Label Then
Dim l As Label = sender
l.ID = Nothing
End If
End Sub
</script>
<asp:Label ID="MyLongIDLabelForName" runat="server" Text="Salvo" OnPreRender="DeleteID"></asp:Label>
This is a good solution. :-)
I have been doing a little experiment with custom control in asp.net. So, I think...what I can do if I have a web page where I can't put a textbox ? Simple, the solution to my problem is the javascript prompt function. So, I'v created a simple control for prompting where a user click a text.
The code of prompt control:
Imports
Microsoft.VisualBasicNamespace Salvo
Public Class PromptControl
Inherits System.Web.UI.WebControls.HyperLinkImplements IPostBackEventHandler
Public Event Prompt(ByVal sender As Object, ByVal e As String)
Public Property Message() As String
GetReturn ViewState("PromptMessage")
End GetSet(ByVal value As String)
ViewState(
"PromptMessage") = value
End Set
End PropertyPublic Sub New()
MyBase.New()
End SubProtected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
Page.ClientScript.GetPostBackEventReference(
Me, "")Me.Attributes.Add("onclick", "__doPostBack('" & Me.ClientID & "',prompt('" & Message & "'));")
MyBase.Render(writer)
End SubPublic Sub RaisePostBackEvent(ByVal eventArgument As String) Implements System.Web.UI.IPostBackEventHandler.RaisePostBackEvent
RaiseEvent Prompt(Me, eventArgument)
End SubEnd Class
End
Namespace
The code of web page:
<%@ Page Language="VB" %>
<%
@ Register Namespace="Salvo" TagPrefix="SA" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
script runat="server">Protected Sub AlertMe(ByVal sender As Object, ByVal message As String)
Page.ClientScript.RegisterStartupScript(
Me.GetType, "promptMessage", "alert('What you have typed in prompt is " & message & "');", True)End Sub
</
script><html xmlns="http://www.w3.org/1999/xhtml" >
<
head runat="server"><title></title>
</
head>
<
body>
<form id="form1" runat="server">
<div>
<SA:PromptControl runat="server" ID="A" Text="Prompt me" Message="Input what you want!" OnPrompt="AlertMe" ></SA:PromptControl>
</div></form>
</
body>
</
html>
More Posts
Next page »