0 answers

Dropdown comboboxcell on button click

IDE: Visual studio c# .net 4.0 In my project I want dropdown datagridviewComboboxcell on button_click event. button_Onclick(sender s, eventargs e) { DataGridViewComboBoxCell dgv = ...

17 secs ago
2 answers

How to make a manually created button invisible after it is clicked in Windows Form?

I manually created a button using the code below. Usually with buttons I can set their Visible=false to make them invisible, which I do in the setInvisible method I call when the button is clicked. I …

31 secs ago
1 answer

How to manage behindcode buttonclick event by jquery button?

I have two buttons: <center> <p><button id="newuserbutton" >Create New User</button> <p><button id="edituserbutton" >Edit User</button> </center> ...

1 answer

Input string was not in a correct format. (Editable Gridview)

Whenever I try to edit information inside my gridview it throws me this error.... here is my code for row editing protected void GRDTech_RowEditing(object sender, GridViewEditEventArgs e) { ...

1 min ago
0 answers

How can you implement an interface with a generic method?

Consider the following classes and interfaces: interface INameable { string Name { get; } } interface IRepository<T> { void Add(T obj); IEnumerable<T> Values { get; } } ...

2 mins ago
1 answer

WCF REST Service return Method not found

I have developed a WCF REST service & trying to test with Asp.net though works with wcf test client. This service maybe used by non-dot net client. Am trying to create a test page in asp.net to …

3 mins ago
13 answers

Converting byte[] to string in C#

I have a .NET byte[] that is loaded from a file that I happen to known contains UTF-8. In some debugging code, I need to convert it to a string. Is there a one liner that will do this? Under the ...

5 mins ago
3 answers

A potentially dangerous Request.Form value was detected from the client XXX

Yesterday my application went down and when I checked the log folder I found out the error log file size was about 5 MB. I suspect someone attacked my site. These are the errors I found: A ...

5 mins ago
1 answer

How to pass variable from textbox to code behind back to same page

I have a webs form page and I have a text box which once clicked passes a variable to the code behind and then back into another element of that page and I cannot get it to work. This is the closest I …

5 mins ago
1 answer

Get data element from partial in modal, set value of textbox in parent with Javascript?

I'm using ASP.Net MVC 5 with C#. I have a view with a button that calls a modal, which is populated by a partial view. The partial view runs a foreach loop to display a name, email, and "Select" ...

1 answer

Problems with inherit while adding custom user control

I was trying to implement this custom timepicker user control from Codeproject Timepicker Control Downloaded the zip file and added the contents inside "CustomControls" Folder to my project. The ...

1 answer

Lucene : very slow NRT performance

I'm testing performance of NRT (near real time) searching in my application and i'm getting really odd results. I'm using this query as a sample to get all elements (the test set is very small so ...

7 mins ago
6 answers

Regex for IP address

I tried this code for validating IP address, but it doesn't work... public static bool IP(string ipStr) { string pattern = ...

8 mins ago
1 answer

how to extract data from listview into a PDF file?

I'm trying to make a pdf file of the items listed on my listview. How can I do this? and is it possible to include the column headers?

8 mins ago
0 answers

Build VS project changes the function signature and not compiled

I'm a bit confused what I should put in the title. But the problem is the following one: I've added a dll reference to my web application project. The functions/variables used in the page are then …

1 answer

Outlook 2010 Add-In not getting installed correctly by WiX

I am trying WiX 3.8 for the first time, trying to create a setup for a simple Outlook 2010 add-in. The add-in, apart from other things, needs to create a ribbon tab on the Compose. I guess I a ...

2 answers

byte[] to ushort[]

Here is my question. Bear with me giving a little explanation: I am reading tiff image into buffer; Each pixel of my tiff is represented by a ushort (16 bits data, non-negtive). My image size is …

2 answers

Calling Process.Start(“foo.exe”) in an ASP.net project hosted on Azure. How to restrict “foo.exe”'s access?

So I have an ASP.net project hosted on Azure that runs.exe executables supplied by users. Think of it like an online web terminal simulator. I'm running the submitted exe's with Process.Start(). …

8 mins ago
1 answer

HttpClient - System.Net.Http.UnsupportedMediaTypeException - Server StatusCode 500

Here's my WCF service contract, one of the method sigs: [WebInvoke(UriTemplate = "", Method = "POST")] public InventoryResponse Post(InventoryRequest inventoryRequest) { This REST endpoint works in …

0 answers

Many entities to one junction table NHibernate modelling

I would like to be able to add a collection of Notes to any of my main entities in my NHibernate application. I can see how you could do this with a seperate junction table per entity. However, I ...

2 answers

Passing Eval value to C# method for shopping cart

I am creating a shopping cart web app for my class. When the user clicks on the add to cart button, I want to pass the value of the ID of each specific product to a separate method in the code behind. …

9 mins ago
2 answers

SignalR polling not always returning accurate database results

In my app I begin an import process by uploading an XML file. Once it is uploaded, a series of stored procedures are run and the xml file is parsed, and data is inserted into many different tables. As …

9 mins ago
3 answers

ToUpper method for a string of words in a foreach loop not working

I have a string array of names, and I want all the names to be in all caps. This is my simple code, but it does not do anything to the names. foreach (string x in names) { x.ToUpper(); …

10 mins ago
3 answers

how to add dots automatically while writing in TextBox (solved)

I have one TextBox with binding on DateTime type. I need to get a dot after first 2 chars and second 2 chars, for example: 12.12.1990. I'm using behavior in TextChanged event, that code: void ...

12 mins ago
2 answers

Textbox Keydown event not firing when arrow key press

I have a datagrid with one column as DataGridTemplateColumn as follows : <my:DataGrid Name="dgvSales" RowHeight="23" SelectionUnit="Cell" BeginningEdit="dgvSales_BeginningEdit" ...

14 mins ago
0 answers

WP8 Maps control - Get name of the City with await function

I have a function to get the city name: private async Task<string> OnMapHold() { ReverseGeocodeQuery query; List<MapLocation> mapLocations; MapLocation mapLocation; query …

2 answers

Windows Phone 8.1 Page Navigation

I'm still new with the Windows Phone development. So now I'm going to develop the Windwos Phone 8.1. I really no idea what's the problem with the page navigation. I wrote the code like this private …

2 answers

Are the AES legal key sizes really the limit?

The AesCryptoServiceProvider.LegalKeySizes field shows you the allowed sizes in bits. However what I don't understand is if those are true, how am I able to successfully utilise a 2048 bit key length …

0 answers

process.start: new process has different files rights then the parent, why?

i'm starting a child application from my main process with the following code: ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = DestinationNameEXE; startInfo.WorkingDirectory …

3 answers

Azure Architecture for Casino type game

I'm creating a casino type game which allows users to bet on an event, and I plan to use Microsoft Azure as the back-end for processing and data storage (Table Storage). I'm looking for any ideas on …

15 30 50 per page
1 2 3