| Alasdair 的个人资料alasdair's brain dump日志列表网络 | 帮助 |
|
|
2008/5/14 ORCA - MSI File Viewer and Editor2008/5/13 Moving InetPub on IIS72008/5/12 Really useful tools for Vista or Windows Server x64Create ISO files: Alex Feinman's ISO Recorder is simple and works like a charm
Mount ISO files: Magic Disc is freeware and seems to be spyware free and again, just works
Checksum those files with Cody Batt's Hashtab shell extension - I agree, this is the coolest thing ever!
Installing IIS7 from the command lineThis installs the whole 9 yards, and is the right thing to do if you later want to install SQL Server 2005 with Reporting Services:
start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-LegacySnapIn;IIS-FTPPublishingService;IIS-FTPServer;IIS-FTPManagement;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI
2008/5/8 AjaxControlToolkit and Master Pages and ResolveControlIDI've been using the AjaxControlToolkit for a bit and I quite like it - there may be better Ajax frameworks out there, but this one is really well integrated into .NET, and that's good for me. Anyway, I had some bother with the ModalPopup when used inside a page which uses a Master page. I was putting the the CSS for my popup at the end of my <asp:Content /> but things like the initial positioning and the dragging were all messed up. I fixed that by
So, the Master page looks like this: <body> <form id="form2" runat="server"> <ajaxToolkit:ToolkitScriptManager ID="MasterTookitScriptManager" runat="server" /> <asp:ContentPlaceHolder ID="slotAjax" runat="server" /> <div id="topcontainer"> <div id="logostrip"> <div id="logo"> </div> <div id="dsTitle"> Document Scanning </div> <div id="formTitle" runat="server" class="formTitle"> Form Title </div> <div id="userInfo" runat="server" class="userInfo"> </div> </div> <div id="content"> <div id="innercontent"> <asp:ContentPlaceHolder ID="slotMain" runat="server" /> </div> </div> </div> </form> </body> And the Ajax stuff on the page looks like this: <asp:Content ID="fillAjax" runat="server" ContentPlaceHolderID="slotAjax"> <ajaxToolkit:ModalPopupExtender runat="server" ID="programmaticModalPopup" BehaviorID="programmaticModalPopupBehavior" TargetControlID="cmdDefer" PopupControlID="pnlPopup" BackgroundCssClass="modalBackground" DropShadow="True" RepositionMode="RepositionOnWindowResize" CancelControlID="cmdPopupCancel" PopupDragHandleControlID="pnlPopupDragHandle" OnResolveControlID="programmaticModalPopup_ResolveControlID" /> <hr /> <asp:Panel ID="pnlPopup" runat="server" Style="display: none" CssClass="modalPopup" DefaultButton="cmdPopupOK"> <asp:Panel ID="pnlPopupDragHandle" runat="server" Style="cursor: move; background-color: #DDDDDD; border: solid 1px Gray; color: Black; text-align: center;"> <div> <p> How long would like to defer this document for? </p> </div> </asp:Panel> <div> <asp:RadioButtonList ID="radPeriod" runat="server" ... <p style="text-align: center;"> <asp:Button ID="cmdPopupOK" runat="server" Text="OK" OnClick="cmdPopupOK_Click" ValidationGroup="Deferral" /> <asp:Button ID="cmdPopupCancel" runat="server" Text="Cancel" CausesValidation="false" OnClick="cmdPopupCancel_Click" /> </p> </div> </asp:Panel> </asp:Content> Now there's one problem remaining: the TargetControlID="cmdDefer" attribute refers to a button in a different <asp:Content /> and the default control ID resolution implementation in ExtenderControlBase.cs doesn't find my control. This shows up as an exception in the Page Render method: Server Error in '/Uncoded' Application.
The TargetControlID of 'programmaticModalPopup' is not valid. A control with ID 'cmdDefer' could not be found.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.InvalidOperationException: The TargetControlID of 'programmaticModalPopup' is not valid. A control with ID 'cmdDefer' could not be found. Source Error:
Line 364: protected override void OnPreRender(EventArgs e)
Line 365: {
Line 366: base.OnPreRender(e);
Line 367:
Line 368: if (Enabled && TargetControl.Visible)
Source File: C:\Dev\AjaxControlToolkit\AjaxControlToolkit\ExtenderBase\ExtenderControlBase.cs Line: 366 The designers of the toolkit already thought of this though, and if they can't resolve your ControlID, they'll ask you to do it for them by raising the ResolveControlID event. So the final part of the puzzle is to catch the event and respond to it: protected void programmaticModalPopup_ResolveControlID( object sender, AjaxControlToolkit.ResolveControlEventArgs e )
Job done! |
|
|