.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

shortkey problem for hidden control

Posted By:      Posted Date: September 07, 2010    Points: 0   Category :WPF
i have one problem, i have assigned shortcut key(Alt+N) to wpf button. shortkey will trigger a event even though button is disable. below code is used -xmal code is     <UserControl.InputBindings>         <KeyBinding Command="{Binding Path=Delete1Command}" Modifiers="Alt" Key="N"></KeyBinding>     </UserControl.InputBindings> <Button Content="Button1" Height="23" HorizontalAlignment="Left" Margin="14,34,0,0"  Command="{Binding Path=Delete1Command}" x:Name="button1" VerticalAlignment="Top" Width="75" /> Any Idea,   thanks nadig

View Complete Post

More Related Resource Links

Problem getting applicaton to run after retrieving it from source control software.


I am restoring my asp 2.0 app from a source control project to my local drive.

The application was originally created on a different PC but was created with Visual Studio 2005,

ASP.net 2.0.

The source control add-in (Harvest) is not working correctly so I retrieving and saving my web app

outside of Visual Studio.

I finally put all the pieces of the web app back together but now when I compile my app I get the following message:

Build (web): Could not load the assembly 'App_Web_myApplication.master.cdcab7d2'. Make sure that it is compiled before accessing the page.

Will I have to start over ?

Thanks for your insights !

Problem with Wizard Control



I have a wizard, which contains a series of custom user controls as steps. Also I am using the step navigation template to add in the navigation buttons.

However, due to some steps needing a little time to load fully due to web service calls and having to add some dynamic steps, I would like to disable the navigation buttons until the next step has been loaded and change the text on the "Next Button" to "loading...". Is there away I can do this perhaps with JavaScript or is there away I could do this with an AJAX control? If so, does anyone have an example I could use?


AJAX rating control on DataRepeater problem



 I am using a DataRepeater control to display records from a database. I have placed an AJAX rating control in the repeater. The control works fine for the first record in the data repeater but it does not work for the rest of the records. The problem is that the control renders fine on the screen but I cannot click it - the mouse changes when hovering over it, but the control does nothing, not even when I click it. The first item works ok though. Any ideas what could be the problem?

 Thanks a lot

Problem with AJAX control toolkit


Hi guys

i'm newbie to AJAX usage.

i'm using visual web developer 2008 express edition

i downloaded AjaxControlToolkit.Binary.NET35 from codeplex site.

i extracted the zip file.

I added the toolbox to visual web developer by adding a new tab naming it ajax kit.

added tools to it by choose item and selected AjaxControlToolkit.dll ,the one i unzipped.

AJAX tools appear in toolbox.Even after using script manager tool,when i drag one of the contols for example autocompleteextender,i get a circle with black diagonal line indicating i cant use the tool

Why is it so..

when i hard code the the controls in tags in source tab ,i dont get an error but i dont get the tool in design view...

the following lines are also present

<%@ Register assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI" tagprefix="asp" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>

Can anyone plz help me...

It's urgent

Thank u

Problem in Custom Control Unable to find Control To Validate Property


I make a custome control by taking a TextBox and A Regular Expression Validator.When i Use this on a .aspx page it works fine.But when i use this on .ascx page and dynamically load user control on a place holder in .aspx page it through an Error

Unable to find control id '_ctl0:txtEmail' referenced by the 'ControlToValidate' property of '_ctl0:txtEmailRequired'


My Custome control Code is this"--

public class EmailValidator:System.Web.UI.Control, INamingContainer{

private System.Web.UI.WebControls.TextBox textBox;

private System.Web.UI.WebControls.RegularExpressionValidator regularExpressionValidator;

public EmailValidator(){

textBox = new TextBox();

regularExpressionValidator = new RegularExpressionValidator();

IsErrorTextBelow = true;

IsRequired = false;

Problem with User Control Properties


I've been trying to figure out a problem that I've had for the past week and believe that the issue is something with a user control that I created. In short, the properties for the user control are recognized by intelisense when I register the control and then add it in the markup for a page. However, the values that I set in the markup are ignored by the class as if the properties don't exist.



Parent Page

 <%@ Register Src="../../controls/contactdetail.ascx" TagName="ContactDetail" TagPrefix="tfc" %>

<tfc:ContactDetail runat="server" ID="UserControlContactDetail" Title="Contact-Detail" ContactId="1580" EnableViewState="true" />   



User Control Class

Imports System.Data
Imports System.Data.SqlClient

Partial Class control_ContactDetail
    Inherits System.Web.UI.UserControl
    Public Property ContactId() As Integer
            Return _ContactId
        End Get
        Set(ByVal value As Integer)
            _ContactId = value
        End Set
    End Property
    Private _ContactId As Integer
    Public Property Title() As String
            Return _Title
        End Get

Ajax Control Toolkit problem

I have been trying over a week to make ModalPopup work. Still can't understand how to do it. Can somebody help me? Actually, I didn't find a way to use ANYTHING from the Ajax Control Toolkit.I want to put a ModalPopup with the Toolkit 4 in the Log In of this file:<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="WebApplication1.SiteMaster" %> <%@ Register      Assembly="AjaxControlToolkit"      Namespace="AjaxControlToolkit"      TagPrefix="ajaxToolkit" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head id="Head1" runat="server">     <title></title>     <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />     <asp:ContentPlaceHolder ID="HeadContent" runat="server">     </asp:ContentPlaceHolder>     <script runat="server"> </script> </head> <body>     <form id="Form1"

problem on Page_PreRender with RangeValidator control and programmatically setting Maximum and Minim

I am new to the ASP.NET /C# dev. I run into a weird bug when using the RangeValidator Control inside a Formview. I have my DateTime field with validator and it work fine until I submit the page, it actually insert the row into the database but then when the page reload I get the following exception.Server Error in '/Budget' Application. The value '' of the MaximumValue property of 'RV_AjoutUtilisateurDate' cannot be converted to type 'Date'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: The value '' of the MaximumValue property of 'RV_AjoutUtilisateurDate' cannot be converted to type 'Date'. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [HttpException (0x80004005): The value '' of the MaximumValue property of 'RV_AjoutUtilisateurDate' cannot be converted to type 'Date'.] System.Web.UI.WebControls.RangeValidator.ValidateValues() +1077011 System.Web.UI.WebControls.RangeValidator.ControlPropertiesValid() +12

problem with menu Control

i am using menu Control and i got a interesting think when i run it through right click and click view in browser then sub menu under menu id display but when i will run it through debug mode then only root is display sub menu is not display.why? 

Reorder list problem having to do with control placement

I have a page with a FileUpload control that uploads an image to a sql db when Button_Upload is clicked. I also have a reorder list contained within an update panel to display all the images in the database.The problem is with the code as shown below:1. I have the Button_Upload as an AsynchPostbackTrigger for the Update Panel2. The FileUpload.PostedFile=Nothing in Button_Upload_Click and no new image gets loaded.If I remove Button_Upload as an AsynchPostbackTrigger as a trigger then1. image gets added but reorderlist doesn't get refreshed and new picture doesn't appear in reorder list2. if I manually refresh browser button click event fires and image gets added againWhat is the way to place controls/triggers to get reorder list to show new picture when it gets added to the database? Thanks   <%@ Page Title="" Language="VB" MasterPageFile="~/sfcas_nofooter.master" AutoEventWireup="false" CodeFile="ImageUpload.aspx.vb" Inherits="ImageUpload" MaintainScrollPositionOnPostback="true" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div id='leftside_fixproblem' &g

Having problem with drawing rounded corners with borders using RoundedCornersExtender control

Hi, I have created panel using below syntax <asp:Panel style="z-index:4;top:270px;left:270px;width:320px;height:200px;position:absolute;"  Enabled="True" CssClass="Panel" TabIndex="4" Visible="True" runat="server" ToolTip="" BackColor="" BorderStyle="NotSet" BorderWidth="0px">  <div style="clear:both"></div></asp:Panel> and added rounded corner extened control using <cc1:RoundedCornersExtender Corners="All" runat="server" TargetControlID="panel4" BorderColor="Black" Enabled="True" Radius="10"></cc1:RoundedCornersExtender>Issue: At run time   there is  a gap between border and corners. I am using doctype of this" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >"If i changed the doc type to below "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" ><html xmlns="http://www.w3.org/1999/xhtml" >" its working fine.Is there any solution for this with out changing the doc type?Advanced thanks for your help.Thanks,Charles  

Problem displaying Date from Sql table on Calendar Control

Hi, I am displaying Event dates from SQL table on Calendar Control in ASP.NET. Also, I have GridView Control which shows event details when certain date is clicked on calendar control. But I have a problem as not all dates are displaying properly. Strangly enough only dates which have same month and day date are displayed. For example: It shows ok dates such as 08/08/2010, 09/09/2010, 10/10/2010 etc. If I click on the date which in SQL table exists as 11/25/2010 or 12/15/2010 etc (no matching month/day numbers) it shows error message saying: "System.Data.SqlClient.SqlException: Conversion failed when converting date and/or time from character string."  Follwoing is my code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data.Sql; using System.Runtime.Remoting.Messaging; using System.Configuration; using System.Data.SqlClient; using System.Data; using System.Drawing; public partial class Test_Calendar : System.Web.UI.Page { SqlConnection mycn; SqlDataAdapter myda; DataSet ds = new DataSet(); DataSet dsSelDate; String strConn; private void Page_Load(object sender, System.EventArgs e) { strConn = "Data Source=mydatasource;Initial Catalog=DBname;Persist Security I

Problem with Asp:menu control in IE8

Hai friends, Here i am facing a new problem,i created a navigation page by using asp:menu control,and after when i viewed it in Internet explorer8, the SubMenu's are not displaying. But when i checked the Compatibility view button which is next ot Stop and Refresh Or in Tools->CompatabilityView. then it is displaying the submenus. The same problem exists in Google Chrome but not in FireFox Can any one tell me the solution how to view the submenus without changing the Compatability settings. Thanks Maniraju

Grid view control problem

HiI am using the grid view control where i am using <asp:CommandField for editing & deleting i want to visible false of this coloumn with edit & delete button..how do this.Thanks<asp:GridView DataKeyNames="StaffCalendarId"  PagerSettings-Mode="NumericFirstLast"                                                        PagerStyle-HorizontalAlign="Center" ShowHeader="true" AllowPaging="true" AutoGenerateColumns="False"                                                        Width="100%" ID="gvEventInfo" runat="server" CellPadding="4" ForeColor="#333333"                            &nbs

Problem with Binding Dictionary to Combo Box Control

Hi All,I am trying to figure out how to bind <Key,Value> pair to Combo Box Control in WPF. By now i have found that the following code do not hold Keys in the comboBox:[vb Code]Dim MyDictionary as Dictionary(OF String,String)MyDictionary.Add("Key1","Value1")MyDictionary.Add("Key2","Value2") ..etc.'***** MyComboBox is ComboBox control ******MyComboBox.ItemSource =  MyDictionary.Values[xmal]<xmls:ComboBox x:Name="MyComboBox" />Doing the above process does not fulfill my purpose of capturing keys. Example if i want to get the "Key" for "selectedItem" then i cannot since i have not binded it.Can anyone suggest me a solution? If anyone can provide me with a xmal and code behind that would be great!!!THanks in Advance.

Problem with LayoutTemplate and the Login-control

Hi, I'm trying to make a login-form for my website, but i needed to customize the standard-layout, because the validators made the login-button move a couple of pixels to the right of the textfieldsWhen using the LayoutTemplate, I can't seem to get the login to work.. When adding a button with "Login" as the ID, shouldn't that button handle the loginprocess from the membership-providers validateuser-method?If not, and I'm supposed to handle the loginprocess myself? And if so, how do I get to the validateuser-method? I don't wanna have the method in two seperate places if I can avoid it..

Problem in tab control with MVVM Pattern

Hi,  Am new to wpfpatter and mvvm also. I have problem, i need to assign the same shortcut key(say alt+N) to two button in different tab. i have used the following code to assign the shortcut. problem in when i click the shortcut key in tab one it will get trigger the tab two button event. --xmal code is     <UserControl.InputBindings>         <KeyBinding Command="{Binding Path=Delete1Command}" Modifiers="Alt" Key="N"></KeyBinding>         <KeyBinding Command="{Binding Path=Delete2Command}"   Modifiers="Alt" Key="N"></KeyBinding>     </UserControl.InputBindings>        <TabControl  Height="100" HorizontalAlignment="Left"  Name="tabControl1" VerticalAlignment="Top" Width="200">             <TabItem Header="tabItem1" Name="tabItem1">                 <Grid>                     <Button Content="Button1" Height="23&q
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend