code-behind Questions

5

Solved

I have a very simple class that is located within my App_Code folder in my VS2008 web application project. I am trying to instantiate an instance of this class from my code-behind file. Intellisens...
Susann asked 15/2, 2011 at 16:57

2

Solved

I'm trying to access a user control which is inside the control template of a content control. Specifically: <ContentControl x:Name="MyList" > <ContentControl.Template> <ControlT...
Hydrophobic asked 14/11, 2011 at 19:3

6

Solved

When the Image's Source property is set the following way, the picture is taken from /Images/down.png. How would I do the same thing programmatically? <Image x:Name="myImg" Source="/MyProject;...
Cutie asked 28/6, 2011 at 8:5

7

Solved

I have a series of textboxes on a form. When the user inserts numbers into these textboxes, calculations are made and <asp:Label> controls are updated via JavaScript to reflect these calculat...
Desmid asked 12/4, 2012 at 17:17

2

Solved

I have a master page with a Form element (<form runat="server">), a content page with a Button element (<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Sync" />), ...
Judicial asked 7/2, 2013 at 21:32

3

Solved

Say I have the elements with the ID's of "Input1", "Input2" and "Input3". Is there a way to loop through them rather then having to write: Input1.Value = 1; Input2.Value = 1; Input3.Value = 1; ...
Separatist asked 7/4, 2015 at 12:46

1

Solved

I have a asp checkbox in my form: <asp:CheckBox id="option" runat="server" OnCheckedChanged="checkChange" data-attributeA="somevalue1" data-attributeB="somevalue2" AutoPostBack="true" />` ...
Brahmana asked 23/2, 2015 at 10:40

3

Solved

I can't for the life of me figure out how to do something that I did forever in VS2008 and earlier with VS 2012. When creating a web application, throw some server side controls on the page, then ...
Georgena asked 22/10, 2012 at 17:10

2

Solved

Okay I clearly haven't fed google the right query or I would've found out by now. I'm hoping someone on this forum can help me. So I have a datatable that I'm adding rows to based on a datareader ...
Macaroon asked 30/6, 2010 at 4:20

2

Solved

I have made my own custom converter which given a string returns a Brush. Now I'm able to return constant brushes such as Brushes.Red etc., but I really want to use my own colors which I have defin...
Appraise asked 4/2, 2010 at 19:52

6

Solved

How do I set the font of a TextBox from a string in the code behind? // example txtEditor.FontFamily = "Consolas";
Wound asked 23/10, 2010 at 3:14

3

How do i add controls to datatemplates programmatically? For Example. Below I've created TextBlock and DataTemplate. TextBlock text = new TextBlock(); DataTemplate template = new DataTemplate(); ...
Hub asked 29/3, 2011 at 10:57

1

Solved

I have a RadComboBox that is bounded by a datasource. I set the datacource to select from a the database using a select query. Run I run the project, I get a complete list of items in the RadComboB...
Dropout asked 11/7, 2014 at 16:20

2

Solved

We have a page that creates a printable version of the customer's bill. We are using themes via <pages styleSheetTheme="CityDesign">. This page is not using the Master page nor has any style ...
Otherdirected asked 20/9, 2010 at 21:3

2

How to programmatically set (using GET SET property) "httpRuntime maxRequestLength" in ASP.NET with C# as code behind is there any way to set values in web.config through C# ?
Tammara asked 31/7, 2011 at 9:45

2

How I can draw a circle in WPF (without code-behind) using min(width, height)/2 as radius?
Amorphism asked 22/9, 2011 at 1:3

2

Solved

I've abandoned the MVVM midway through app development just to get this app out. I've written a method in the code behind to update the database/datagrid etc. My application navigation is using ...
Donley asked 6/3, 2014 at 16:7

2

Solved

How do I set width with percent in code behind? The only option I can think of is taking the parent width and calculate by percent.i.e. TableRow.Width = Table.Width.Value * 25/100 (set table row wi...
Testicle asked 31/8, 2011 at 14:45

3

Solved

In Brief: In an ASP.net website with a code-behind, at what point are the *.cs files compiled? Context: A colleague who has since left, deployed a website with a .cs code-behind to a shared serve...
Volney asked 15/1, 2014 at 10:13

2

Solved

I want to add a popup on click of a Button in WPF. I dont want to add Popup code in my XAML. It has to be code behind. My XAML is as follows:: <Window x:Class="Test.Window1" xmlns="http://sch...
Neb asked 18/11, 2010 at 5:59

3

I'm trying to set the following properties in the C# code behind of StackPanel that I need to add programmatically: BorderThickness BorderBrush Any idea on how to set these programmatically?
Dynamometry asked 6/9, 2012 at 1:48

6

Solved

This is a bit of a Visual Studio question. I feel with all the helpful Intellisense there should be something to assist but I can't seem to find it. I made a page with a codebehind in ASP.NET C# i...
Diaconicum asked 25/6, 2009 at 21:21

3

Solved

I am refactoring a stack of ASP.NET pages. I'd like to compile and test the ones I've completed. However, Visual Studio won't let me run the Web Site with compile errors on the non-refactored pages...
Ganges asked 20/10, 2008 at 18:37

5

Solved

Why is the code behind a partial class for aspx pages?
Quinquagesima asked 25/8, 2009 at 18:51

5

Solved

I'm using WPF with the Model-View-ViewModel pattern. Thus, my code behind files (.xaml.cs) are all empty, except for the constructor with a call to InitializeComponent. Thus, for every .xaml file I...
Samples asked 3/12, 2009 at 17:46

© 2022 - 2024 — McMap. All rights reserved.