usercontrols

User Controls Importing Problem (asp.net)(vb)

I have this class that contains vars for db connection; Imports Microsoft.VisualBasic Imports System.Data.SqlClient Imports System.Web.Configuration Public Class DBVars Public Shared s As String Public Shared con As String = WebConfigurationManager.ConnectionStrings("NMMUDevConnectionStr").ToString() Public Shared c As New S...

Caching and cache invalidation in user controls?

HI, In our .aspx pages we have many user controls. each user control executes a sql query. The caching mechanism to be followed is to fragment cache each user control on the page and add the query dependency to the respective queries of the user controls. How to achieve query dependency on fragment cached data for invalidation? ...

Windows Forms User Controls in WPF app.

Could someone post a link to simple tutorial, which describe how to use User Controls, created in Win Forms in WPF aplication's? Sank's a lot. ...

ASP Button Calling JavaScript Function

I am attempting to construct my own date picker using code from several sources. Specifically, I am now attempting to have an asp:button display/hide the calendar. What am I doing wrong? myDate.ascx <%@ Control Language="vb" AutoEventWireup="false" CodeBehind="myDate.ascx.vb" Inherits="Website.myDate" %> <script language="javasc...

WPF User Control - Round corners programmatically

Another WPF question... <UserControl x:Class="TKEApp.Components.UserControls.ButtonControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt; <Grid Background="Black"> <TextBlock Foreground="White" Background="Brown" Name="lblCaption" TextAlignment="C...

Share ASP.NET pages and user controls between applications

This article http://support.microsoft.com/kb/324785 indicates that you have to setup virtual directories to share pages and user controls between applications. This is not an option for me. I just want to share a few pages between two applications. Is there any other way or do I have to duplicate code by adding it to both apps? ...

JavaScript Function Definition in ASP User Control

I defined a JavaScript function inside a user control. If I have multiple instances of the user control on my .aspx page, how do I prevent multiple function definitions in the resulting HTML code? ...

Relative path from an ASP.NET user control NavigateUrl

I have a user control that contains a GridView. The GridView has both a HyperLinkField column and a template column that contains a HyperLink control. The ASP.NET project is structured as follows, with the Default.aspx page in each case using the user control. Application Root Controls UserControl with GridView SystemAdminFolder D...

Enhance Localization performances? (ComponentResourceManager.ApplyResources)

Dear all, After experiencing some performances issues on my client side, we decided to give a try to some of the performance profilers to try to find the bottleneck or identify the guilty parts of the code. Of course, as many performance investigations, the problems comes from various things, but something I find out is that the Compone...

How to access usercontrol's values from page?

Hi I've created user control named test.ascs with one textbox. Now I added this user control in my default.aspx page. How can i access that textbox value from my default.aspx page? is there any chance? ...

UserControl Behaviour on a Windows Form

Hi, I have a usercontrol UC1 which has a combobox and a button. From the constructor, after initializing all the controls, I am populating the combobox with an array of information brought from other class library. I have kept the UC1 on windows form. When I tried to open the form's designer I see some errors and a suggestion to rebuild...

Custom CheckBoxList in ASP.NET

Since ASP.NET's CheckBoxList control does not allow itself to be validated with one of the standard validation controls (i.e., RequiredFieldValidator), I would like to create a UserControl that I can use in my project whenever I need a checkbox list that requires one or more boxes to be checked. The standard CheckBoxList can be dragged ...

Share Name between differing Silverlight UserControls

Hey there, having trouble with this one... I have 2 different types of usercontrols that I want to use one x:Name with. Only one will be active/exist/on stage at a time. Say for simplicity, one is of type MyCircle and the other is of type MyRectangle. And say there is a MyCircle instance declared in XAML at first with the x:Name = "M...

How programmatically dock new element to DockPanel

How programmatically create an element based on UserControl and dock it to the DockPanel? ...

ASP.NET User Control Value

I created a DatePicker user control (ASP code below, no code behind) which is simply a textbox, image button, and a sometimes visible calendar. <%@ Control Language="vb" AutoEventWireup="false" _ CodeBehind="myDatePicker.ascx.vb" Inherits="Website.myDate" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlTool...

How to fix the flickering in User controls.

In my application i am constantly moving from one control to another. I have created no. of user controls, but during navigation my controls gets flicker. it takes 1 or 2 sec to update. I tried to set this SetStyle(ControlStyles.OptimizedDoubleBuffer, true); or SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.AllPaintingI...

User controls do not properly fit on the screen

Hi, My application has several controls. Like in one screen has TreeView on left side, GridView with paging in the middle and 4 buttons at right side. The controls properly appear when the form is in a maximized state, but if I minimize it the controls do not properly fit on the screen. I tried with different different tricks like tab...

Adding scrollbars to UserControl

I am trying to add vertical and horizontal scrollbars to my UserControl with the HorizontalScroll and VerticalScroll properties, but I am having extreme issues. My problem arises when I drag or manipulate the scroll box on the bar. When I let it go, it simply jumps back to the start position! I know of the AutoScroll property, but I do ...

How to access a named element of a derived user control in silverlight ?

Hello, I have a custom base user control in silverlight. <UserControl x:Class="Problemo.MyBaseControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlform...

When should I use a UserControl instead of a Page?

I notice that many of the WPF MVVM frameworks seem to avoid using the NavigationWindow and Page controls in favor of composing pages using nested UserControls. The NavigationWindow and Page provide easy ways to enable back and forward navigation in the journal as well as providing an easy way to pass data among pages. Most MVVM framewo...