code-behind

How do i get my repeater results to appear line by line

时光毁灭记忆、已成空白 提交于 2019-12-12 01:57:40
问题 <p runat="server" id="pServices"> <asp:Repeater runat="server" ID="rptServices" OnItemDataBound="rptServices_OnItemDataBound"> <HeaderTemplate></HeaderTemplate> <ItemTemplate> <asp:Label runat="server" ID="lblService"></asp:Label> </ItemTemplate> <AlternatingItemTemplate> <asp:Label runat="server" ID="lblService"></asp:Label> </AlternatingItemTemplate> </asp:Repeater> </p> And in the code behind I have private void updatePageWithUserData(User UserProfile) { this.pProfile.InnerText =

How to bind panels with controls in devexpress docklayoutmanager

落花浮王杯 提交于 2019-12-11 20:37:28
问题 File Name SampleProject My xaml file Mainwindow.xaml---------- <Window x:Class="SampleProject.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking" Closing="Window_Closing" Title="MainWindow" Height="800" Width="800" WindowState="Maximized"> <Grid> <dxdo:DockLayoutManager x:Name="docklayoutmanager1" dxdo:RestoreLayoutOptions.RemoveOldPanels="False"

How to call code behind function from label.text in asp.net

断了今生、忘了曾经 提交于 2019-12-11 20:32:29
问题 I am trying to call a function defined in code behind from Label.Text but it's not working. Here is the code... code in .aspx file <asp:Label runat="server" Text='<%# GetPagingCaptionString() %>' ID="pagenumberLabel"></asp:Label> code block from code behind public string GetPagingCaptionString() { int currentPageNumber = Convert.ToInt32(txtHidden.Value); int searchOrderIndex; if (int.TryParse(Convert.ToString(Session["searchOrderIndex"]), out searchOrderIndex)) { return string.Format("{0} to

How do I debug an asp.net program without code behind?

不打扰是莪最后的温柔 提交于 2019-12-11 19:04:44
问题 I inherited a web site that I know little about. I've worked with asp.net/C# websites, but this seems to be something different. There is no code behind for me to put a break point and step through it. Also several refernces in the program can't be found. My general question is: How do I debug this program in Visual Studio? Specifc questions related to this sample code: Where do I put my break point? What happens in this sample when a user clicks the submit button? The program inherits

How to hide or disable radiobuttonlist and textbox based on condition of another two textboxes when edit button is clicked

孤街醉人 提交于 2019-12-11 17:44:39
问题 I have a formview with textboxes and radiobuttonlist and edit button in the order as follows <asp:textbox id="tb1" runat="server" text='<%# Bind("DATE_1", "{0:d}") %>' /> <asp:calendarextender id="tb1_CalendarExtender" runat="server" targetcontrolid="tb1" /> <asp:textbox id="tb2" runat="server" text='<%# Bind("DATE_2", "{0:d}") %>' /> <asp:calendarextender id="tb2_CalendarExtender" runat="server" targetcontrolid="tb2" /> <asp:button id="EditButton" runat="server" causesvalidation="False"

Execute ClientSide before ServerSide in ASP.NET

元气小坏坏 提交于 2019-12-11 16:43:48
问题 I am using ASP.NET 3.5. When the user click on say btnSubmit I want to first execute some JavaScript code and then execute some C#/VB.NET code. Is this possible? If so how would one do it? Thanks in advance! 回答1: This is very simple: http://msdn.microsoft.com/en-us/library/7ytf5t7k.aspx <%@ Page Language="C#" %> <script runat="server"> protected void Button1_Click(Object sender, EventArgs e) { Label1.Text = "Server click handler called."; } </script> <html xmlns="http://www.w3.org/1999/xhtml"

Programmatically creating a clickable area on an image

三世轮回 提交于 2019-12-11 14:53:49
问题 I'm trying to create "imagemaps" on an image in wpf using codebehind. See the following XML: <Button Type="Area"> <Point X="100" Y="100"></Point> <Point X="100" Y="200"></Point> <Point X="200" Y="200"></Point> <Point X="200" Y="100"></Point> <Point X="150" Y="150"></Point> </Button> I'm trying to translate this to a button on a certain image in my WPF app. I've already did a part of this, but I'm stuck at setting the Polygon as the button's "template": private Button GetAreaButton(XElement

How to connect hyperlink with our program

我的未来我决定 提交于 2019-12-11 11:14:48
问题 I have problem, i don't know how to connect hyperlink with my program. I want add to registry key until install which connect file extension with my program. e.g. I have hyperlink on website which open file .xyz, and i wannna browser "open file as [my_program_in_c#]". 回答1: You need to create the following registry keys, perhaps during installation [HKEY_CLASSES_ROOT.xyz] @="dawid.xyz.1.0" [HKEY_CLASSES_ROOT.xyz\OpenWithProgids] "dawid.xyz.1.0"="" [HKEY_CLASSES_ROOT\dawid.xyz.1.0] @=

Call method in code-behind (secure page) from client (JavaScript)

点点圈 提交于 2019-12-11 11:11:42
问题 Let me start of by saying I am very new to ASP.NET and C#. I have a simple web form containing data which I want to send to a code-behind page. The idea is to capture the data and send it as a JSON object to a code-behind method. Note that this is done via JavaScript/AJAX (see code below). The code-behind method will then do a trivial HTTP "PUT" request to update the data. The .apsx page is located in the Secure folder (uses a Secure Master). Don't know if that will affect the method calling?

Create binding to string in Resources.resx from code behind

为君一笑 提交于 2019-12-11 10:14:24
问题 I started by making a label in XAML with its content bound to a string in my resources file. I've implemented localization and confirm that when I change languages, the label's content updates accordingly. Now I need to do the same from code behind. Here is a taste of the XAML: <Grid Background="#FF313131"> <ScrollViewer> <StackPanel x:Name="GeneralTab_StackPanel"> <WrapPanel VerticalAlignment="Top" Background="{Binding AxisDataColorCode}" Margin="2,2,2,0"> <Label x:Name="lbl_General