Finally managed to get my DNN v4.6.2 install into the root. My problem was I had tried darrenmcleod.com/ as the portal alias but it kept giving me an infinite redirect error. Then I tried darrenmcleod.com as the portal alias and everything is goodness. Note that when you make a change like this just through the database you need to do something to cause your application to reload, like editing a line in web.config and saving it.
Dynamic HeaderText for an ASP.NET 2.0 Wizard Control
I wanted to have the Wizard Control Header display the current step’s title, after a little research I found that the ActiveStepChanged event would allow me to do this. So I added an event handler like this:
Protected Sub Wizard1_ActiveStepChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Wizard1.ActiveStepChanged Me.Wizard1.HeaderText = Me.Wizard1.ActiveStep.Title End Sub
Except it didn’t set the Header for the first step so I set the HeaderText manually to the first step’s title like this:
<asp:Wizard ID="Wizard1" runat="server" HeaderText="Step 1"> <WizardSteps> <asp:WizardStep ID="WizardStep1" runat="server" Title="Step 1"> </asp:WizardStep> <asp:WizardStep ID="WizardStep2" runat="server" Title="Step 2"> </asp:WizardStep> </WizardSteps> </asp:Wizard>
How to make an ASP.NET Web User Control Width editable.
Add a property to your WebUserControl:
Private widthValue As Integer Public Property Width() As Integer Get Return widthValue End Get Set(ByVal value As Integer) widthValue = value End Set End PropertyThen add a prerender event handler to the WebUserControl, where in this example the MainTable happens to be the outermost container element in the Web User Control with a width attribute:
Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender If Me.Width > 0 Then Me.MainTable.Width = Me.Width End If End Sub
Then wherever you use the control you can specify the width if you want to:
<uc2:MyWebUserControl ID="MyWebUserControl1" runat="server" width="650" />
VS 2005 Team System Webtest ValidationRule on an asp:dropdownlist control
With this html:
<select name="ctl00$ContentPlaceHolder1$CompanyDropDownList" id="ctl00_ContentPlaceHolder1_CompanyDropDownList" class="Normal">
<option selected="selected" value="1">All</option>
<option value="2">Company 1</option>
<option value="3">Company 2</option>
<option value="4">Company 3</option>
<option value="5">Company 4</option>
<option value="6">Company 5</option>
<option selected="selected" value="1">All</option>
<option value="2">Company 1</option>
<option value="3">Company 2</option>
<option value="4">Company 3</option>
<option value="5">Company 4</option>
<option value="6">Company 5</option>
</select>
In my webtest I wanted to verify CompanyDropDownList had selected option 2 "Company 1".
Tried Form Field with form field name ctl00$ContentPlaceHolder1$CompanyDropDownList but it did not work.
Using Required Attribute Value worked with the following values:
Attribute Name value
Expected Value 2
Ignore Case False
Match Attribute Name selected
Match Attribute Value selected
Tag Name option
Microsoft.ApplicationBlocks. ExceptionManagement The event source x does not exist error
If you get the following error when using the Microsoft.ApplicationBlocks.ExceptionManagement library:
System.Security.SecurityException: The event source ExceptionManagerInternalException does not exist and cannot be created with the current permissions. ---> System.Security.SecurityException: Requested registry access is not allowed.
at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at System.Diagnostics.EventLog.CreateEventSource(EventSourceCreationData sourceData)
at System.Diagnostics.EventLog.CreateEventSource(String source, String logName)
at Microsoft.ApplicationBlocks.ExceptionManagement.DefaultPublisher. VerifyValidSource()
One way of solving this is to install the Microsoft.ApplicationBlocks.ExceptionManagement.dll by running the following in a dos window:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe Microsoft.ApplicationBlocks.ExceptionManagement.dll
If for some reason your server admin doesn’t want to do that then you can just ask them to create the two event sources manually using eventcreate in a dos window:
eventcreate /t error /id 1000 /so ExceptionManagerInternalException /l application /d "new src ExceptionManagerInternalException in application log"
eventcreate /t error /id 1000 /so ExceptionManagerPublishedException /l application /d "new src ExceptionManagerPublishedException in application log"