asked on
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="TiosClient.WebForm3" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" />
</div>
<asp:Button ID="Button2" runat="server" Text="Button" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<ajaxToolkit:ComboBox ID="ComboBox1" runat="server">
</ajaxToolkit:ComboBox>
<div >
<p><ajaxToolkit:ComboBox ID="ComboBox2" runat="server">
</ajaxToolkit:ComboBox>
</p>
</div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
</form>
</body>
</html>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace TiosClient
{
public partial class WebForm3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
string test1 = "Testing WenForm3...";
Button1.Text = test1;
ComboBox1.ClearSelection();
ComboBox1.Dispose(); // required to clear previous values
ComboBox1.Items.Clear();
ComboBox1.Text = "HelloThere ";
ComboBox1.Items.Add("Option1");
ComboBox1.Items.Add("Option2");
ComboBox1.Items.Add("Option3");
ComboBox1.Items.Add("Option4");
ComboBox1.Visible = true;
ComboBox1.MaxLength = 500;
ComboBox2.ClearSelection();
ComboBox2.Dispose(); // required to clear previous values
ComboBox2.Items.Clear();
ComboBox2.Text = "HelloThere ";
ComboBox2.Items.Add("Option1");
ComboBox2.Items.Add("Option2");
ComboBox2.Items.Add("Option3");
ComboBox2.Items.Add("Option4");
ComboBox2.Visible = true;
ComboBox2.MaxLength = 500;
}
}
}
C# is an object-oriented programming language created in conjunction with Microsoft’s .NET framework. Compilation is usually done into the Microsoft Intermediate Language (MSIL), which is then JIT-compiled to native code (and cached) during execution in the Common Language Runtime (CLR).
TRUSTED BY
It is a hunch as I have not used AJAXToolkit in last 10 years or so, but can you move the ScriptManager to the top of your page please?
Also, can you post your master page's code here? You can remove any sensitve stuff from it before posting it here.
PS: Any specific reason you are using WebForms and AJAXtoolkit?
Regards,
Chinmay.