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

Top 5 Contributors of the Month
Post New Web Links

WPF button with short cut character access no longer possible?

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :WPF

I defined a string like "&OK" is my resource file.

if i do normal WinForm application, with a button that I do button.text = Properties.Resources.OK, my button will appear with a text "OK" with a short cut key underlined O on it.

However, if i do it in WPF, i would set my button with button.Content = Properties.Resources.OK?? then my button in WPF will appear as &OK

How to overcome this problem?

Please help me. THanks


1 + 1 = 3

View Complete Post

More Related Resource Links

Access denied when user clicks refresh BDC column button

Access denied occurs with any non Site Collection Administrator regardless of rights.  It only occurs in this site collections, others they are able to refresh.  In this particular collection they can add a BDC column to a list, edit an item and place/resolve a value in the bdc col; but when they refresh they are given an acess denied.  Any thoughts on what they need read access to?  This goes away if I give site admin privs (dont want to do that) or give them read only access on the web application (dont want to do that either).

VBA application can no longer access SQL Server

For a not-for-profit organization (www.ace-event.org ), I developed a simple MS Word application. Basically, upon opening the app, it accesses data on a remote SQL Server to populate a form, which is then used to generate a document. I used www.ConnectionStrings.com to help configure the DSN-less connection. The application, which was developed in April 2009 under XP Pro and Office 2003 ran perfectly through Jan 2010. The reason for my posting should be obvious – the application no longer runs. I have tried running it on three different computer with XP Pro/Office 2003, XP Pro/Office 2007, and Win7/Office 2010 respectively. In all cases, I get the error: Run-time error ‘-2147467259 (80004005)’: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified I cannot be 100% certain that the error code returned was the same in each case. I am, however, 100% certain that the code is completely identical to that which ran previously and that the error occurs before any network access occurs. Here is the connection string code:     Set cn = New ADODB.Connection     cn.ConnectionString = "Driver={SQL Native Client};Server=<ip_address>\sqlexpress,1433;Database=<db_name>;Uid=<UID>;Pwd=<PWD>"     cn.CursorLocation = adUseClient     cn.Open I have

Authentication Providers button greyed out. Trying to turn on anonymous access

Please can you assist. I am trying to enable anonymous access. Tutorials point me to: 'Central Admin > Site Actions > Site Settings > Application Management > Manage web applications > Sharepoint - 80' I should then click on 'Authentication Providers'. This button is greyed out. I am running in dev on windows 7 64bit. Thanks.

FtpWebRequest - Access to IBM AS/400 FTP Server - 501 Character (/) not allowed in object name.

Hello everybody

I'm trying to communicate with an AS/400 FTP Server. As a first try I just execute the WebRequestMethods.Ftp.ListDirectory method, which translates to the NLST FTP command. Doing the same accessing a Microsoft FTP Server or a UNIX FTP Server works fin.

This is the code to get the listing:

Dim Uri As System.Uri = New System.Uri(listUrl)
Dim listRequest As FtpWebRequest = CType(WebRequest.Create(Uri), FtpWebRequest)
listRequest.Credentials = New System.Net.NetworkCredential(User, Password)listRequest.Method = WebRequestMethods.Ftp.ListDirectory
listRequest.KeepAlive =
listRequest.UseBinary =

Access PreviousPage on the button click handler of target page


Hi, I Have two pages source.aspx and target.aspx. Source.aspx has one button and other form controls the collect input. The button has its postbackurl property set to target.aspx.

On target.aspx I have another button and other form controls that collect input. When the user clicks on the target.aspx button, I want the inputs from both source and target gathered to be inserted into the database. The problem is the Page.PreviousPage property is only available during the initial rendering of the target.aspx page. So when I click on target.aspx button, PreviousPage is now null. 

One strategy of mine is to collect the information on page_load and store it in ViewState, but is there any other method that I should consider in this process. I think the cleanest approach would be to somehow access PreviousPage on the button_click event handler, but how can I access this property.


How can I access a radio button value selected in a dataview?



I have an aspx page that uses a simple form to perform a search and the results are presented in a dataview.

I have added a radio button to one of the columns and have set the value to be the records ID. What I need to do is allow the user to select the row they require from the data view by selecting the radio button.

Does anyone know how I can access the ID value of the selected radio button?

Eventually I will have a number of dataviews on the same page and will need to allow the user to select a row from each dataview and then send the radio button values to another page using query string generated by a button.

How can i play short sound when im over the button in C#?

i want, whenever i was over the button in C#, short sound will play
I,m CRAZY about learning NEW things.

Access to Top right Close Button


I have an WPF application built using VS 2008 .net in VB code with 3.5 framework. I have a number of xaml pages that i have an added button on the page and menubar item that closes the page. When i open and close the page i set a global variable to indicate if the page is open or closed. So....if i use the added button to close the page the variable is set to closed. However, if i open a page and use the red close button at the top right of the window, the page closes but the global variable does not get set. Therefore when i try and open that page again, i get a message the page is already open.

So, my question is how do i access the code and set a variable if the red X window close button is used? Also Windows 7 allows the same functionality by clicking on the Icon of the open window in the Task Bar and closing it that way.

Any help will be greatly appreciated.


Can no longer access files, lists, permissions, etc.


After doing some testing (attempting to create an anonymous accessible site), I can now no longer externally access any of the documents in any of my SharePoint libraries, permissions, etc.  I can VIEW the libraries, lists, etc.  When I try to open an item, I get an error.  When I attempt to click the dropdown next to an item, I get the "file may have been moved error".  When I am inside the domain, I have no problems doing any of that.

The only changes that were made, were to follow adding anonymous access step-by-step (even created a site and turned it on- couldn't get it to work- kept getting login prompt), so then I created an extension of the Sharepoint -80 site in Central Administration, and put it in the "Internet" zone.  When the new site I had created wouldn't work, I deleted the "Internet" web application extension I had created. 

I'm thinking that's the root of my issue- that the "Internet" zone has some how been mucked beyond belief- but I have no idea where to look to fix it- now I'm in that dreaded place of I've tried so much stuff, that I'm basically chasing my tail at this point.

This is SharePoint Server 2010, running on Windows 2008r2, with SQL 2008r2 as our DB Server.

MVC architecture in ASP.Net using C# and Microsoft Data Access Application block

The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]:

Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View. The view manages the display of information.

Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.

Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

Maintain HTML Radio Button Selection Inside GridView After Postback

Long time ago I wrote an article about getting the value of the selected RadioButtons inside the GridView control. The code did not addresssed the postback issue which means that the selected radio button was cleared after the postback occurs.

A Simple and Extensible Radio Button Style GridView

The GridView is one of the significant controls in ASP.NET 2.0 and later versions. No doubt it reduces a lot of work time. However, customizing the GridView control is not an easy task. For example, it's hard to add a radio button column to the GridView. This article demonstrates the reason why a radio button column cannot act as normal and how to create a simple and extensible radio button GridView.

Short Overview of SharePoint Features in Visual Studio 2010

As you probably know, Visual Studio 2010 was announced earlier this week and it contains a lot of cool features and project templates for SharePoint developers. Below is a short overview for some of the SharePoint development related features and project templates.

Editable Gridview with Textbox, CheckBox, Radio Button and DropDown List

This is an example of an editable gridview containing different ASP.NET controls. When user wants to edit values in gridview, she/he can use these controls to edit existing values in Gridview Edit Mode.

Using the Code

Radio Button Event

Here I have explained the events of radio button with javascript.
Let me explain the scenarion first,
We are having two radio button say radioobtn1 and radiobtn2. If I click on the button 1 then I need to show one DIVor FORM. same as when I click on radiobtn 2. I have given the code for the above scenarion.

Store and Display Images from MS Access Database Using C#

There is only the difference of coding syntax to stream the binary data of image content type to upload it into MS Access Database using C#/VB in ASP.Net 2.0

Namespaces required:-
using System.Data.OleDb;

OleDb is used to connect the web site forms with MS Access Database using Microsoft.Jet.OLEDB.4.0
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