.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

problem with mdi controls

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :Windows Application
Hello I have an MDI window and whenever i try to open more than one different child dialogs, the previous dialog is closed. Here is a sample code what i'm using:   Dim cln As New Client() m_ChildFormNumber += 1 cln.Show() How do I solve this problem and have more than one child dialog in my MDI window? Thanks

View Complete Post

More Related Resource Links

Problem with Dynamic Controls



I have a custom user control that contains within it a repeater control. Inside this repeater I programmatically add another custom user control, which contains a text box and a custom validator. This final custom user control can be added any number of times depending on the application's logic. All of this is part of a wizard step.

When the user completes the step, if any of the data added to the text boxes is incorrect the validator gets fired on post back. However, because I can have any number of these controls added to the repeater, the user has to scroll down to see any of the incorrectly completed boxes.

Due to the controls being added dynamically it is not possible to use a validation summary control - I have tried!!! Therefore, is there away I can use JavaScript to position a cursor or to jump to each incorrectly completed textbox without the user needing to scroll down the page? For example, if there are 10 textboxes, and textboxes 8 and 9 have numbers inside them inside strings, then the JavaScript should jump textbox 9.

Problem with list controls and update progress template



I have an update panel that surrounds a wizard control which I use in conjunction with a update progress control. Now my update progress control works perfectly, with my animated gif and div tag that lays over my wizard control when the user goes from step to step. However, there is a problem that I am struggling to solve. A number of my steps use controls like list boxes, and when the update progress control fires, the list control is not laying underneath my div an animated gif no matter how high a make my css z-index on the div.

Does anyone have a way of solving this?


Problem getting values next to each other from two separate CheckBoxList controls

Hi, I am using three CheckBoxList controls in ASP.NET Wizard control. CheckBoxList controls: <asp:CheckBoxList ID="cblLondonDates" runat="server" DataSourceID="SqlDataSource1" DataTextField="ShowDate" DataTextFormatString="{0:G}" DataValueField="ShowDate" ForeColor="#333333" CssClass="ShowDateMargin"></asp:CheckBoxList> <asp:CheckBoxList ID="cblSingleL" runat="server" DataSourceID="SqlDataSource2" DataTextField="size8" DataValueField="size8" ForeColor="#333333"> </asp:CheckBoxList> <asp:CheckBoxList ID="cblHalfL" runat="server" DataSourceID="SqlDataSource2" DataTextField="size6" DataValueField="size6" ForeColor="#333333"></asp:CheckBoxList>   cblLondonDates chackboxlist control shows dates generated from SQL table. cblSingleL an cblHalfL show table sizes. On ASP page they come up as following: 12/03/2011(checkboxlist-ID="cblLondonDates")-Single(checkboxlist-ID="cblSingleL") - Half(checkboxlist-ID="cblHalfL") 03/03/2012(checkboxlist-ID="cblLondonDates")-Single(checkboxlist-ID="cblSingleL") - Half(checkboxlist-ID="cblHalfL") 05/10/2010(checkboxlist-ID="cblLo

ASP.NET 4.0 charts controls problem

Hi All, I have a very weird problem. I have used asp:chart control to display chart on my home page. The home page is accessible to both, logged in and anonymous users. When I log in and access the home page, I can see the chart image. The problem is, when an anonymous user tries to access the page, the chart image is not rendered. I checked the folder and the image does get created but it does not get rendered. I have tried number of things, assigned full rights to the folders, tried to save the file in both, file and session. But none of them work. If anyone has come across such problem and know of a solution then please do let me know asap. Thank you in advance. -VT

Problem with user controls and the toolbox

Im building a control library, its just a library that builds to a dll with a bunch of user controls. But So far I can only get "user controls" to be loaded into the toolbox in a separate project. Many on my user controls need only be derived from a specific control and I often find using a user control is unnecessary for the control. So the question is, how can I get a control that is not derived from the user control class, to show in the toolbox, in a separate project? Another thing I would like to decorate my controls with an icon for the toolbox. I tried [ToolboxBitmap("Filename")] at the top of the class but it did not work for me.AbleOpus.ath.cx

Problem with Dynamic Controls inside an UpdatePanel

Hello Everybody ,I have this problem,if anyone could help me i'll be so gratefull. I had been created some dynamic radio buttons in a loop inside a dinamy table which is inside an UpdatePanel , but i can not handle the events my code is below:public void MetodoCreacion(){RadioButton RBtn = null;Table table = new Table();TableRow row = null;TableCell cell = null;for (int i = 0; i < 5; i++){row = new TableRow();cell = new TableCell();RBtn = new RadioButton();RBtn.ID = "RBGN_" + i.ToString();RBtn.GroupName = "RBGN1";RBtn.Text = "Opcion " + i.ToString();RBtn.CheckedChanged += new EventHandler(RBtn_CheckedChanged);RBtn.AutoPostBack = true;cell.Controls.Add(RBtn);row.Controls.Add(cell);table.Controls.Add(row);}UpdatePanel1_UpdatePanelAnimationExtender.Controls .Add(table);}public void RBtn_CheckedChanged (object sender, EventArgs e){Label1.Text = ((RadioButton)sender).ID;}and the controls doesent call the event ...thanks a lot

Problem registering client side script to interact with AJAX controls

Im using some animationExtenders in my project. The thing is, the objects to be animated are created programmatically, hence i need to also build programmatically the javascript code that will interact with them.It runs properly but, when i interact with these animated controls and the javascript functions are supposed to get to work, i keep getting the usual run-time error saying that the javascript functions are not defined. But, if i check the final html code generated, i can see how all the controls i built programmatically are there ,as well as the script.Tried both RegisterStartupScript and RegisterClientScriptBlock, no luck.Any advice? thanks in advance

Textbox WebControl Enabled/Disabled problem: Disabled controls looks great in Firefox but in IE they


Hi everyone,

I don't know if you face the same problem when your page logic has to set the enabled textbox's property to FALSE.  If i use FireFox to browse the page, my disbled controls are show with a dark-silver background color (perfect for me), but when i browse with IE, disabled or enabled textboxes are show the same way (no color differences).

Is there a way to manage controls appearance depending on the Enabled property?

I appreciate your support.


Problem with using ajax controls



I have a problem with using gridview, scriptmanager and other controls. My visual studio 2010 says: "Element 'scriptmanager' is not a known element. This can occurif there is a compilation error in the website, or the web.config file is missing."

Visual studio is complaining on updatepanel, gridview, scriptmanager and some others. I've searched the net for this, and some people say this can happen if you use masterpages, others say that there could be some missing lines in the web.config file. I can't really find a example on how the web.config should look like, neether can I find how to solve the issues with masterpages.

Does anyone out there know of a good and informative article that i can read, or maybe try to explain what i can do and what the issue may be?

here's my web.config content:

<?xml version="1.0"?>
  For more information on how to configure your ASP.NET application, please visit
		<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
			<sectionGroup name="scr

Problem with having multiple user controls in 1 app


I have some problems with User Controls when they are used in conjunction with TabControl bound to a ICollectionView (from a ObservableCollection<TabViewModel>). The UserControls all seem to act as 1 and content I enter in 1 will also appear in other UserControls.

Suppose I have TabViewModel, a simple class with properties for Tab Title and Content

public class TabViewModel : ObservableObject
  protected string _tabTitle;
  protected string _text; 

  public string TabTitle {
    get { return _tabTitle; }
      _tabTitle = value;
  public string Text {
    get { return _text; }
      _text = value;

Optimization problem - Generic collections and user controls


I have a Winforms app (VS 2005/DotNet2) that contains a generic collection of a user control  

- Private c as new collection(of UserControl1)

Essentially it's the heart of the system and the system has grown extremely fat, to the point where users are complaining about speed.  Aside from the large number of database lookups, a major part of operations is iterating through the collection itself, to create it, set its values, and so forth.  (I am planning to try performance tools but that may take some time.)

For starters I was wondering if there was anything more optimum than a For each UC1 in C loop?  I really haven't worked that much with generic collections other than this one instance.

Problem with controls created in codebehind



I've a simply page :

<asp:Panel ID="DynamicPanel" runat="server">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button1" onclick="Button1_Click" />

And relative code-behind :

    protected void Page_Load(object sender, EventArgs e)

    protected void Button1_Click(object sender, EventArgs e)
        int num = int.Parse(TextBox1.Text);
        RadioButtonList rList = new RadioButtonList();
        for (int i = 0; i < num; i++)
            ListItem anItem = new ListItem("Item n." + i.ToString());
        Button ReadChoice = new Button();
        ReadChoice.Click += new System.EventHandler(ReadChoice_Click);
        ReadChoice.Text = "Read";

    protected void ReadChoice_Click(object sender, EventArgs e)
        String selectedText = ((RadioButtonList)DynamicPanel.Controls[0]).SelectedItem.Text;
        // Do something...

The users insert a number in the TextBox1

Problem in Accessing Server Controls Value or ID in JavaScript



I have a master page MasterPage.master


<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!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>Untitled Page</title>
    <asp:ContentPlaceHolder id="head" runat="server">
    <form id="form1" runat="server">
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">



And a Content Page Default.aspx


<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
  <script language="javascript" type="text/javascript" src="JScript.js"></script>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHol

Binding WPF Controls to an Entity Data Model

In this interview, programming writer, McLean Schofield, demonstrates how to bind WPF controls to an entity data model, using Visual Studio 2010 Beta 1. You can also learn more in the topic: Walkthrough: Binding WPF Controls to an Entity Data Model.

Custom Controls in C# .NET

Embedding user controls in a Windows form is just like adding a simple button or text box that are already provided with .NET. These basic controls were written essentially like you code your own controls. Typically the controls you design are to be used in multiple forms or to modularize your code. These reasons help reduce the amount of code you have to type as well as make it easier for you to change your implementation. There should almost never be any reason to duplicate code because it leaves a lot of room for bugs. So, implementing functionality specific to your control in the control's source code is a good idea. This reduces code duplication as well as modularize your code, which is a good programming guideline.

Accessing the different controls inside a GridView control

how we can access a particular control which resides inside a GridView control. In this article I will show you how you can access different controls inside a GridView control. We will see how we can access a TextBox control, a DropDownList control and a ListBox control. If you are working with ASP.NET 1.X then you might want to check out my article Accessing Different Controls Inside a DataGrid.

Using ASP.NET 3.5's ListView and DataPager Controls: Displaying Data with the ListView

Prior to ASP.NET 3.5, developers who needed to display a set of records could choose between the GridView, DataList, and Repeater controls. The GridView provides rich data features, but has a very boxy layout; the DataList and Repeater allow for a more flexible layout, but lack the "point and click" data features found in the GridView, DetailsView, and FormView controls. The ListView bridges the gap between layout flexibility and built-in data features.

This article, the first in a series of articles on the ListView and DataPager controls, looks at the ListView's many available templates and illustrates how to display data. Read on to learn more!
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend