Top "Code-behind" questions

Code-behind refers to code for your UI (Windows Forms, ASP.

Setting the value of insert parameter of SqlDataSource in codebehind

I have this SqlDataSource in my form: <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" InsertCommand="…

c# parameters insert code-behind sqldatasource
ASP.NET Dropdown List in Codebehind vs in ASPX page

I am generating a dropdown list in codebehind and cannot get the selectedindexchanged event to fire automatically. It works fine …

asp.net drop-down-menu code-behind selectedindexchanged
WPF: Referencing app-wide resources in code-behind

I have made my own custom converter which given a string returns a Brush. Now I'm able to return constant …

c# wpf resources code-behind
In an ASP.NET website with a codebehind at what point are the .cs files compiled?

In Brief: In an ASP.net website with a code-behind, at what point are the *.cs files compiled? Context: A …

c# asp.net code-behind
Attach behavior in code behind

I have the following Xaml that is used in a user control that used as an editor inside a property …

c# wpf xaml mvvm code-behind
How to set window icon in code behind in wpf?

In xaml it is : <View:BaseWindow.Icon> /VBDAdvertisement;component/Images/logoVBD.png </View:BaseWindow.Icon> I …

wpf icons code-behind
OnDataBinding vs Inline: pros, cons and overhead

I thought I would ask this question to see why many examples and people prefer to use inline databinding in …

c# asp.net coding-style code-behind
Setting Validation error template from code in WPF

I have a TextBox in my WPF app. I have defined a ControlTemplate for validation error as follows: <ControlTemplate …

wpf validation textbox code-behind controltemplate
Difference between page_load and onLoad

What is difference between page_load and onLoad functions in ASP.NET codebehind?

c# asp.net .net code-behind
Can two ASPX pages inherit the same code behind class?

I'm just starting out learning ASP.NET. From what I understand, ASP.NET differs from old school ASP in that …

c# .net asp.net code-behind