Imports System.Diagnostics
Dim sw As New Stopwatch() sw.Start() ' Do the work here sw.Stop() Console.WriteLine("Elapsed time: {0}", sw.Elapsed.TotalMilliseconds)
Imports System.Diagnostics
Dim sw As New Stopwatch() sw.Start() ' Do the work here sw.Stop() Console.WriteLine("Elapsed time: {0}", sw.Elapsed.TotalMilliseconds)
ListItem li =new ListItem(); li.value="PT"; li.Text="Portugal"; dropdownlist1.Items.Add(li);
or
dropCategory.Items.Add( New ListItem( "Portugal", "PT" ) )
<asp:TextBox ID="txtDate" runat="server" ></asp:TextBox> <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtDate" Format="MM/dd/yyyy" OnClientShowing="showDate" > </cc1:CalendarExtender> <script type="text/javascript" language="javascript"> function showDate(sender,args) { if(sender._textbox.get_element().value == "") { var todayDate = new Date(); sender._selectedDate = todayDate; } } </script>
The Microsoft Enterprise Library is a collection of reusable software components (application blocks) designed to assist software developers with common enterprise development cross-cutting concerns (such as logging, validation, data access, exception handling, and many others). Application blocks are a type of guidance; they are provided as source code, test cases, and documentation that can be used “as is,” extended, or modified by developers to use on complex, enterprise-level line-of-business development projects.
This was because .NET detected something in the entered text which looked like an HTML statement.
This is a feature put in place to protect your application cross site scripting attack and followed accordingly.
To disable request validation, I added the following to the existing “page” directive in that .aspx file.
ValidateRequest="false"
For .NET 4, we need to add requestValidationMode=”2.0″ to the httpRuntime configuration section of the web.config file like the following:
<httpRuntime requestValidationMode="2.0"/>
But if there is no httpRuntime section in the web.config file, then this goes inside the <system.web> section.
If anyone wants to turn off request validation for globally user, the following line in the web.config file within <system.web> section:
<pages validateRequest="false" />
<asp:button runat="server" ID="button1" Text="popup" ></asp:Button>
vb sample:
Protected Sub button1_Click(sender As Object, e As System.EventArgs) Handles button1.Click Dim sb As New StringBuilder() sb.Append("<script>") sb.Append("window.open('http://www.galhano.com', '', '');") sb.Append("</script>") Dim cstype As Type = Me.GetType() Page.ClientScript.RegisterStartupScript(cstype,"test", sb.ToString()) End Sub
This sample shows how to trigger a updatepanel from a control outside of it:
<asp:UpdatePanel ID="uPanel1" runat="server" UpdateMode=Conditional > <ContentTemplate> <asp:TextBox ID="txtMyNumber" runat="server"></asp:TextBox> <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID=uPanel1> <ProgressTemplate> <asp:Image ID="imgAjaxLoader" runat="server" ImageUrl="~/Icon/ajax-loader.gif"/> </ProgressTemplate> </asp:UpdateProgress> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID ="btnUpdateMyNumber" /> </Triggers> </asp:UpdatePanel> <asp:Button runat="server" ID="btnUpdateMyNumber" Text="Set My Number" />
Occurs when a node is selected in the TreeView control.
If we assign any URLs to the NavigateUrl propery of the TreeNode, it will render as a <a> tag, it will not do postback, so it will not file the event;
If we do not assign any URLs to the NavigateUrl propery of the TreeNode, it will render as a short JavaScript which used to postback.
So I think maybe you have assign URLs to the NavigateUrl propery of the TreeNode.
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.treeview.selectednodechanged.aspx
http://forums.asp.net/t/1361178.aspx/1
GoogleMaps.Subgurim.NET is the most advanced Google Maps control for ASP.NET 2.0.
Making available the full power of the official GoogleMaps API, yet without the need of a single line of javascript code: you code only in ASP.NET!
To get going, you just drag the control from the toolbox onto the Visual Studio design surface, and with a few lines of code you will be able program powerful Google Maps applications!
error message:
I get this message when building my Assembly :
————————————————————————————–
Updating references…
Performing main compilation…
vbc : warning BC40010: Possible problem detected while building assembly ‘asdasd’: Referenced assembly ‘asdasd’ is a localized satellite assembly
Building satellite assemblies…
—- Done —
Rebuild All: 2 succeeded, 0 failed, 0 skipped
————————————————————————————–
The assembly you are building is localized differently than the assembly that are referencing.
This probably means that somewhere in the source code for “asdasd” you have an AssemblyCultureAttribute that is present. Code assemblies should never have this attribute — if you remove it, the problem should go away.
source: http://forums.asp.net/p/338021/355306.aspx#355306