[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1322
  • Last Modified:

How do I Get started with AJAX. UpdatePanel and RadioButtonList.

I have an existing ASP.Net 2.0 web form with some RadioButtonList controls that populate a few TextBoxes depending on the SelectedValue, but when you make a selection the postback makes the whole browser window flash.  
I'd like to use AJAX to update only the TextBoxes.
I'm using VS2008 and VB.
I don't see any AJAX controls in the VS Toolbox.  If I select "Show All" in the Toolbox there is an "AJAX Extensions" section, but everything is greyed out.
Do I need to add any .DLLs?
Do I need to edit the web.config?
How do I set up and use AJAX on my form?
Controls from .aspx page that I want to "AJAX enable":
            <div style="text-align:left; margin-left:1em; margin-bottom:.5em;">
 
                    Have you participated in SYEP before?:
                    <asp:RadioButtonList ID="radParticipatedBefore" runat="server" 
                        RepeatDirection="Horizontal" RepeatLayout="Flow" TabIndex="625" 
                        AutoPostBack="True">
                        <asp:ListItem>Yes</asp:ListItem>
                        <asp:ListItem>No</asp:ListItem>
                    </asp:RadioButtonList>
                    <asp:RequiredFieldValidator ID="valradParticipatedBefore" runat="server" ControlToValidate="radParticipatedBefore"
                        ErrorMessage="Participated before is required">*
                    </asp:RequiredFieldValidator>
 
                <span style="margin-left:2em;">
                    How many previous years did you participate?:
                    <asp:TextBox ID="HowManyYears" runat="server" MaxLength="5" TabIndex="626" Width="3em">
                    </asp:TextBox>
                </span>
            </div>
            <div style="text-align:left; margin-left:1em; margin-bottom:.5em;">
                    Where did you work?:
                    <asp:TextBox ID="WhereDidYouWork" runat="server" MaxLength="150" TabIndex="627" 
                        Width="350px"></asp:TextBox>
            </div>
 
*****************************************************************
Code from .aspx.vb:
 
    Protected Sub radParticipatedBefore_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles radParticipatedBefore.SelectedIndexChanged
        If radParticipatedBefore.SelectedValue = "No" Then
            HowManyYears.Text = "N/A"
            WhereDidYouWork.Text = "N/A"
        Else
            HowManyYears.Text = ""
            WhereDidYouWork.Text = ""
        End If
    End Sub

Open in new window

0
megnin
Asked:
megnin
  • 19
  • 14
2 Solutions
 
tiagosalgadoCommented:
0
 
megninAuthor Commented:
Since a lot of the functionality seems to be built into the .Net Framework v3.5 I went ahead and changed the target framework of the project from 2.0 to 3.5.  I have v3.5 SP1 installed.
That did add the AJAX Extensions section to the toolbox.  I'll try adding an UpdatePanel to my page now and see how it goes.
0
 
megninAuthor Commented:
It didn't go quite as smoothly as I had hoped.  I just changed from 2.0 to 3.5 and reloaded the page and got the error below.  I'll see if I can fix it.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (C:\Inetpub\SYEP\web.config line 93)

Source Error:

Line 91:                   <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpHandlers>
Line 92:             <httpModules>
Line 93:                   <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules></system.web>
Line 94:       <system.net>
Line 95:             <mailSettings>
 
Source File: C:\Inetpub\SYEP\web.config    Line: 93

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
megninAuthor Commented:
It runs if I "Debug" but the live site still gives me that error.  
0
 
prairiedogCommented:
When you say "live site", do you mean the server where you publish your application to?
When you say "Debug", do you mean the app runs well in your local machine?
0
 
megninAuthor Commented:
That's correct.  Does it look like I need to install .Net Framework v3.5 SP1 on the web server?
Add/Remove Programs on the web server only shows "Microsoft .NET Framework 2.0 Service Pack 1".
0
 
megninAuthor Commented:
Here's my web.config

I'm getting ready to install the Framework 3.5 SP1 on the server unless there's any reason not to.

<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />
<div>
     <asp:UpdatePanel ID="UpdatePanel1" runat="server">
          <ContentTemplate>
               ... Control that initiates Postback ...
               ... Controls that need to be modified after Postback finalizes ... 
         </ContentTemplate>
    </asp:UpdatePanel> 
</div>
 
 
 
            DBCmd.Parameters.Add("@ParticipatedBefore", SqlDbType.VarChar).Value = radParticipatedBefore.SelectedValue
            DBCmd.Parameters.Add("@HowManyYears", SqlDbType.VarChar).Value = HowManyYears.Text
            DBCmd.Parameters.Add("@WhereDidYouWork", SqlDbType.VarChar).Value = WhereDidYouWork.Text
 
 
 
<asp:UpdatePanel ID="UpdateReportPanel" runat="server" UpdateMode="Conditional">
 
 
 
 
 
<?xml version="1.0"?>
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
	<configSections>
		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
			<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
				<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
				<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
					<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
					<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
					<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
					<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup></sectionGroup></configSections><appSettings/>
	<connectionStrings>
		<add name="SYEP2007ConnectionString1" connectionString="Data Source=DATABASESERVER;Initial Catalog=SYEP2007;Integrated Security=True" providerName="System.Data.SqlClient"/>
		<add name="testConnectionString1" connectionString="Data Source=INTRASERVE\SQLEXPRESS;Initial Catalog=test;Integrated Security=True;Pooling=False" providerName="System.Data.SqlClient"/>
	</connectionStrings>
	<system.web>
		<!-- 
            Set compilation debug="true" to insert debugging 
            symbols into the compiled page. Because this 
            affects performance, set this value to true only 
            during development.
 
            Visual Basic options:
            Set strict="true" to disallow all data type conversions 
            where data loss can occur. 
            Set explicit="true" to force declaration of all variables.
        -->
		<compilation debug="true" strict="true" explicit="true">
			<assemblies>
				<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
		<pages>
			<namespaces>
				<clear/>
				<add namespace="System"/>
				<add namespace="System.Collections"/>
				<add namespace="System.Collections.Specialized"/>
				<add namespace="System.Configuration"/>
				<add namespace="System.Text"/>
				<add namespace="System.Text.RegularExpressions"/>
				<add namespace="System.Web"/>
				<add namespace="System.Web.Caching"/>
				<add namespace="System.Web.SessionState"/>
				<add namespace="System.Web.Security"/>
				<add namespace="System.Web.Profile"/>
				<add namespace="System.Web.UI"/>
				<add namespace="System.Web.UI.WebControls"/>
				<add namespace="System.Web.UI.WebControls.WebParts"/>
				<add namespace="System.Web.UI.HtmlControls"/>
			</namespaces>
			<!--<controls>         This was suppose to all me to use AJAX controls like 'ScriptManager' for an UpdatePanel  I may need to add a .dll as well
        <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
      </controls>-->
			<controls>
				<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
				<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls></pages>
		<!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
		<authentication mode="Windows"/>
		<identity impersonate="true" userName="GUEST" password="drowssap"/>
		<customErrors mode="Off"/>
		<!--
            The <customErrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.
 
        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
		<httpHandlers>
			<remove verb="*" path="*.asmx"/>
			<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpHandlers>
		<httpModules>
			<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
		</httpModules>
	</system.web>
	<system.net>
		<mailSettings>
			<smtp from="noreply@wf1broward.com">
				<network defaultCredentials="true" host="Exchange2" password="" userName=""/>
			</smtp>
		</mailSettings>
	</system.net>
	<system.codedom>
		<compilers>
			<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
				<providerOption name="CompilerVersion" value="v3.5"/>
				<providerOption name="WarnAsError" value="false"/></compiler>
			<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
				<providerOption name="CompilerVersion" value="v3.5"/>
				<providerOption name="OptionInfer" value="true"/>
				<providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom>
	<system.webServer>
		<validation validateIntegratedModeConfiguration="false"/>
		<modules>
			<remove name="ScriptModule"/>
			<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules>
		<handlers>
			<remove name="WebServiceHandlerFactory-Integrated"/>
			<remove name="ScriptHandlerFactory"/>
			<remove name="ScriptHandlerFactoryAppServices"/>
			<remove name="ScriptResource"/>
			<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
			<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></handlers></system.webServer>
	<runtime>
		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
			<dependentAssembly>
				<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
				<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly>
			<dependentAssembly>
				<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
				<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime></configuration>

Open in new window

0
 
prairiedogCommented:
Looks like you are missing the AJAX library on the live site.
0
 
megninAuthor Commented:
Crap, I just discovered that the web server is Windows 2000 Terminal and 3.5 won't install on it.  It said it has to be Windows XP or later.  ;-)
0
 
prairiedogCommented:
And the missing AJAX library is included in .NET framework 3.5. So try installing the framework to see if it works.
0
 
megninAuthor Commented:
Oh, can I just install the AJAX 1.0 library on a Windows 2000 server?
0
 
prairiedogCommented:
There is another way to do it. Go to the solution explorer, expand your References list, then select System.Web.Extensions, in the properties window, set Copy Local to True, then compile and publish your application to the live site.
0
 
prairiedogCommented:
>>>Oh, can I just install the AJAX 1.0 library on a Windows 2000 server?
I don't think so. The version does not match. Try the method I mentioned earlier and let me know if it works.
0
 
megninAuthor Commented:
I installed the AJAX 1.0 Library on the web server and didn't see any difference.
0
 
megninAuthor Commented:
>There is another way to do it. Go to the solution explorer, expand your References
>list, then select System.Web.Extensions, in the properties window, set Copy Local to
>True, then compile and publish your application to the live site.

I have no References folder in my Solution Explorer.  Should I add one?
0
 
prairiedogCommented:
>>>Should I add one?
No.
Is it a web site or web application?
0
 
megninAuthor Commented:
I'm still getting this error:

0
 
megninAuthor Commented:
A web application I guess.  It's an online form.  It pupulates a SQL database.


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Applicant.aspx.vb" Inherits="Applicant" MaintainScrollPositionOnPostback="true" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>SYEP 2009 Application</title>


.vb:

 Dim DBCmd As New SqlCommand
        Dim DBAdap As New SqlDataAdapter
        Dim DS As New DataSet
        DBConn.Open()
        Try
            'Add Insert Statement
            'DBCmd = New SqlCommand("INSERT INTO Applicants
0
 
prairiedogCommented:
Hi megnin,
You are not reading my post. AJAX 1.0 is not gonna work. Your app is expecting 3.5, not 1.0.
Again, is it a web site project or web application?
0
 
prairiedogCommented:
Go to AJAX web site to download AJAX Library 3.5: http://www.asp.net/ajax/downloads/
Let me know when you finish downloading and we can go from there.
 
0
 
prairiedogCommented:
Wait a second. I am sorry, you will still need ASP.NET 3.5 framework. If you can't install 3.5 framework on your live site server, then you can't use AJAX 3.5. You can only use AJAX 1.0.
0
 
megninAuthor Commented:
I do have the option and I've been instructed to move my web app to a Windows 2003 server.  Maybe I should do that before I do anything else.
0
 
megninAuthor Commented:
What's the easiest way to move the web app to a new web server?  Can I just "Publish" it to the new server?  The server is an established web server with other sites already running on it.
0
 
prairiedogCommented:
>>>What's the easiest way to move the web app to a new web server?  Can I just "Publish" it to the new server?
That is correct.
0
 
prairiedogCommented:
BTW, your project is a web site project, if you need this information later on.
0
 
megninAuthor Commented:
What would be considered a "web application"?  I guess I'm not clear on the distinction.  
0
 
prairiedogCommented:
It is not gonna be easy to explain in one post. Do some google and you should be able to find out the difference between the web site project and the web application. Here is one: http://reddnet.net/code/aspnet-web-site-vs-web-application/
0
 
megninAuthor Commented:
I see.  It's a bit more complex than I thought.  I've just been calling it a web site if you just look at it and a web app if it does something, like write to a database.  But I guess I've just been working with web sites that do something.  ;-)  Thanks for the link.

Right now I'm just in the process of rebooting the destination web server (the reboot is unrelated to the web site move) and then I'm going to publish the site to it.  Then make whatever changes I need to in IIS to make it accessible as a URL.

I've got my finger crossed that this will solve the problem.
0
 
megninAuthor Commented:
Wahoo!  I moved the website from the Windows 2000 Server onto a Windows 2003 Server, moved the security certificate onto the new server and now the UpdatePanel works the way it should if I have the RadioButtonList and the TextBoxes inside the UpdatePanel.

<asp:UpdatePanel ID="UP1" UpdateMode="Conditional" runat="server">
<ContentTemplate>
                    Have you participated in SYEP before?:
                    <asp:RadioButtonList ID="radParticipatedBefore" runat="server"
                        RepeatDirection="Horizontal" RepeatLayout="Flow" TabIndex="625"
                        AutoPostBack="True">
                        <asp:ListItem>Yes</asp:ListItem>
                        <asp:ListItem>No</asp:ListItem>
                    </asp:RadioButtonList>

                    How many previous years did you participate?:
                    <asp:TextBox ID="HowManyYears" runat="server" MaxLength="5" TabIndex="626" Width="3em">
                    </asp:TextBox>

                    Where did you work?:
                    <asp:TextBox ID="WhereDidYouWork" runat="server" MaxLength="150" TabIndex="627" Width="350px"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>

But if I use a Triggers collection to  point to the RadioButtonList "radOffender" outside the UpdatePanel, the VB code to change the text in the TextBoxes doesn't work.  
The text changed when the RadioButtonList was changed before I added the UpdatePanel.  Now the UpdatePanel seems to work, no full page postback, but the TextBoxes don't change.  I just finished watching the "ToDoList" video on the ASP.Net Ajax page and it showed it done exactly like I have it as far as I can tell.  I can't immagine what I've missed. (Oh, prairiedog, I realize this question is just a bit beyond the scope of my original question which you have already helped me solve so I'm going to close it when I post this last problem and hope you can point me in the right direction on this.  Thanks!)

<asp:RadioButtonList ID="radOffender" runat="server" AutoPostBack="True">
    <asp:ListItem>Yes</asp:ListItem>
    <asp:ListItem>No</asp:ListItem>
</asp:RadioButtonList>

<asp:UpdatePanel ID="UP2" UpdateMode="Conditional" runat="server">
<ContentTemplate>
        ....the four TextBoxes that get updated when the RadioButtonList
            SeletedIndexChanged fires...
</ContentTemplate>
     <Triggers>
       <asp:AsyncPostBackTrigger ControlID="radOffender" EventName="SelectedIndexChanged" />
     </Triggers>
</asp:UpdatePanel>

0
 
megninAuthor Commented:
Thank you very much for all your help!  
0
 
prairiedogCommented:
Try this and maybe you don't need a new question.
Set the UpdatePanel's UpdateMode=Always. or if you use Conditional, make sure you manually call UpdatePanel.Update after you change the TextBox's text value.
0
 
megninAuthor Commented:
I had UpdateMode=Conditinal and tried UpdatePanel.Update (the panel ID is UP2) in each of these commented places and I always go the same result.  It caused the TextBoxes to never update.  When I removed the triggers then the TextBoxes worked fine.

   Protected Sub radOffender_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles radOffender.SelectedIndexChanged
        'UP2.Update
        If radOffender.SelectedValue = "No" Then
            txtNameOfOffense.Text = "N/A"
            txtNameOfCourt.Text = "N/A"
            txtDispositionOfCase.Text = "N/A"
            txtCaseDate.Text = "N/A"
            'UP2.Update
        Else
            txtNameOfOffense.Text = ""
            txtNameOfCourt.Text = ""
            txtDispositionOfCase.Text = ""
            txtCaseDate.Text = ""
            'UP2.Update
        End If
        'UP2.Update
    End Sub

Open in new window

0
 
prairiedogCommented:
Have you tried moving the RadioButtonList in the UpdatePanel so you can remove the trigger?
0
 
megninAuthor Commented:
Yeah, that's what I finally did and it works fine like that.  I Googled around and found a bunch of people are reporting issues with list type controls, RadioButtonLists, CheckBoxLists and Triggers.  There were a few workarounds, but the best solution seemed to be just move it inside the UpdatePanel.  At least the Trigger does still work as advertised with Button controls.  Thanks for all you help and suggestions.

I have a bigger problem now, so I'm going to go compose a new question.

Cheers,
David
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 19
  • 14
Tackle projects and never again get stuck behind a technical roadblock.
Join Now