code-behind Questions

4

Solved

Our current web portal at work was a port from a classic ASP codebase. Currently, all pages in our project extend a custom Page class called PortalPage. It handles login/logout, provides access to ...
Phototypy asked 1/8, 2010 at 18:48

1

Solved

I create some control in codebehind and would like to set its size dynamically. I can assign numerical values as well as System.Windows.GridLength.Auto, but there is no equivalent to "*". Is that b...
Addis asked 21/7, 2010 at 8:49

4

I am calling a jquery function after inserting a record to database... ScriptManager.RegisterClientScriptBlock(LbOk, typeof(LinkButton), "json", "topBar('Successfully Inserted');", true); I ha...
Tailing asked 2/7, 2010 at 7:22

1

Solved

Given a reference to an object defined in XAML, is it possible to determine what (if any) x:Name the object has, or can I only do this by accessing the FrameworkElement.Name property (if the object...
Sorrel asked 17/6, 2010 at 23:3

1

Solved

In XAML I can write something like this: <Setter Property="PropertyName" Value="{Binding ...}" /> How would I do this in code? I've constructed bindings in code before, but I can't seem to...
Inertia asked 13/6, 2010 at 0:59

4

Solved

I have a label on a page and I'm updating the text property of the label (with a calculated value) when text is changed in a textbox. I'm updating the label like so: $myLabel.text("123"); The t...
Swashbuckling asked 1/6, 2010 at 11:38

3

Solved

Is there an equivalent in ASP.NET to memcached usage in PHP? Is there even a way I could use memcached from the VB code behind, or something like it?
Protolanguage asked 28/4, 2010 at 20:31

1

Solved

I want to use an Enum value for the types of VaryByCustom parameters I will support, is it possible to do this? I tried setting it in the page itself <%@ OutputCache Duration="600" VaryByParam...
Prismatic asked 15/4, 2010 at 18:22

1

Solved

How can I programmatically set a button's template? Polygon buttonPolygon = new Polygon(); buttonPolygon.Points = buttonPointCollection; buttonPolygon.Stroke = Brushes.Yellow; buttonPolygon.Stroke...
Fusee asked 28/3, 2010 at 15:58

1

Solved

I am Binding a Datagrid to dynamic data via IDictionary: http://www.scottlogic.co.uk/blog/colin/2009/04/binding-a-silverlight-datagrid-to-dynamic-data-via-idictionary/comment-page-1/#comment-8681 ...
Elah asked 22/2, 2010 at 21:3

1

Solved

I want to implement a Payment service.I will create some values in code behind and then by using post method I have to post this values to Payment gateway and user must redirect to that page. I ca...
Sihonn asked 13/2, 2010 at 20:9

1

Solved

When a control is added to an UpdatePanel, it can still be accessed from the code behind of the containing page. How is this achieved? Can custom control developers do the same? In other words, if...
Voltaic asked 10/2, 2010 at 14:34

2

I have a c# asp.net 3.5 app I am trying to open a window from code behind after a certain event. I have this but its not working and there are no errors in firebug protected override void OnPreRen...
Legitimist asked 1/12, 2009 at 20:10

5

Solved

I'm working on a web site (not a web application) in VS 2008 .Net 3.5 and it uses the single file .aspx model where the server code is included in the head portion of the html instead of using a .a...
Monogamist asked 12/5, 2009 at 19:52

2

Solved

Does anyone know how to create a wpf Style in code behind, I can't find anything on the web or MSDN docs. I have tried this but it is not working: Style s = new Style(typeof(TextBlock)); s.Registe...
Ripe asked 13/11, 2009 at 14:0

5

I am newbie for ASP.NET MVC 1.0. I am converting from a classic application built up with VS2008 .NET3.5. I created a master page, and the menu must be read from the database. Now the code that gen...
Greasewood asked 9/11, 2009 at 8:54

2

Solved

I know silly question but i tried looking it up on Google with no luck.
Transduction asked 10/9, 2009 at 17:26

6

Solved

Is there any way to get HttpContext.Current.Request.Url.Host and HttpContext.Current.Request.ApplicationPath in one call? Something like "full application url"? EDIT: Clarification - what I need...
Statistician asked 27/3, 2009 at 13:1

3

Solved

In visual studio i want to add a second code behind file to a xaml window (my main form). i know i can have another (or as many) files that form partial parts of a class, and if they are in the sam...
Furfur asked 20/9, 2009 at 23:48

1

I want to grab the default Style for a TextBlock in code behind without ever having adding a custom default TextBlock Style to resources in XAML. I've got a method like this: public TextBlock Dra...
Saddle asked 10/9, 2009 at 18:39

1

Solved

How to set the default style for a type in code-behind e.g. for: <ScaleTransform x:Key="scaler" ScaleX="1.25" ScaleY="1.25" /> <Style TargetType="{x:Type ToolTip}"> <Setter Propert...
Rubiaceous asked 3/9, 2009 at 17:23

11

Solved

How would you explain to a non-technical person why writing code (business-logic) behind the onclick event is a bad practice and leads to unmaintainable code? Edited: I have to explain management ...
Byebye asked 18/8, 2009 at 23:39

8

Solved

I realize that by asking this question, I could have started the apocalypse, but a colleague of mine uses a lot of inline coding in their aspx pages, where as I prefer using the code-behind. Is th...
Tomas asked 29/7, 2009 at 16:19

2

Solved

I can set the margin of a stackpanel in code-behind like this: StackPanel sp2 = new StackPanel(); sp2.Margin = new System.Windows.Thickness(5); But how can I set each individually, both of these...
Devaluate asked 28/7, 2009 at 14:24

2

Solved

I have created a multi plattform project, and everything works nicely, except one little things. When I add a specific plattform file, like: ServiceImpl.cs ServiceImpl.Desktop.cs it does not sh...
Administrative asked 25/6, 2009 at 11:43

© 2022 - 2024 — McMap. All rights reserved.