getting data LINQ MVC view
I'm awkward at getting data in MVC using LINQ. I want to present all of the tours our capitol offers in date order in a view. I'm awkward with where do to the work in MVC. So I've passed the data...
View ArticleFilestream.Write or Save() shows waitcursor frequently
I posted this in another thread as well - basically a file.save operation shows a waitcursor briefly before going back to default. Like a filestream.write(memorystream) to a certain location in the...
View ArticleMultithreading 2 winforms in 1 ( 3 webcam in total)
Hello:I have the next problem. I have 2 winform, the first winform control a motor with a camera where both are syncronized to take several images with a concrete number of frames per seconds. This...
View ArticleHow to marshal two parameters from a C function in a C# delegate method?
Hello all,The following work on a 32-bit machine:The signature of a C call back function is foreign_t (f)(term_t t0, int a)) // with foreign_t, term_t is int on 32-bit in C# I have:public...
View ArticleQuestion on Class Accessors C#
Hi,I was reading some tutorials on database object layers. Can anyone explain the purpose of putting "[]" before accessors like the code snippet below? int _id; [DisplayName("Identity")]...
View ArticleFormat message string in C# to fill in Win32 place holders "%1"
Is there a way to correctly format the message string placeholders %1, %2, etc. from Win32 error strings?The Win32Exception class returns the original Win32 message, but string.Format() only recognizes...
View ArticleUsing OpenStreetMap data in an offline C# webforms application
As part of a project, I have to develop a offline C# application that can calculate the distance and journey time between two points. I'm planning on using data from OpenStreetMap but I'm not too sure...
View ArticleHelp for C# function plotting
My question is: Is there a simple way to convert a string to a single executable instruction?For example:string function = "x*x+Math.Sin(x)";public double f(double x){return...
View Articlehow can fix that
if (Session["currentOrderId"] != string.Empty)is show me the messagePossible unintended reference comparison; to get a value comparison, cast the left hand side to type 'string'
View ArticleRunning Total
Hi Everyone,I'm new to C# and I ran into a problem and was wondering if something can provide me with some assistant on the below problem. I'm trying to simulate an excel formula into C#:I need to...
View ArticleSetting and getting a user selected set of persisted control properties
I am trying to write a C# (Visual Studio 2013 with .NET 4.5 or 4.5.1) application where I have a set of controls used to set up the communications for various devices connected to the PC via a serial...
View ArticleKinect joints to rotation (quaternions)
How rotations are calculated from joint positions in Kinect SDK?I want to get the same values as I can get from BoneOrientations collection (from Skeleton object): quaternions for HierarchicalRotations...
View ArticleURGENT - OutofmemoryException when converting a memorystream into a string
Below is my code to read a very large string column (nvarchar(max)) returned by a stored procedure. The length of the string returned by procedure is apprx. 220021544. (which I calculated in GB as...
View ArticleDatetime.tryparse()
Datetime.tryparse is not giving the correct output. If we give the date as 20-feb-29 result is 20-feb-2029 but if we give it as 20-feb-30 the result is 20-feb-1930, can anyone help on this?
View Articlereading more than one xml node
Hi,I'm writing a web application using .NET and C# that uses an Xml file for username and password storage. I need the password to be entered first then checked against the Xml file which redirects to...
View ArticleHttpWebRequest POST becomes GET
I have a code on c# that used to work on windows server 2003. Yesterday, I tried running the same code on Windows 2012 but the code failed. After investigating, I found out that a HttpWenRequest I am...
View ArticleNeed help with Importing CSV to DataGridView
Hi all,I'm trying to create a stand-alone program so we can upload CSV files into a Datagridview.The issue is when I try to upload tester.csv (Has 10 columns with 2 rows, including header row) I get an...
View ArticleBadImageFormatException when all assemblies are AnyCPU (PE32) or 64-bit (PE32+)
I get BadImageFormatException when running a unit test in VS2013. The error occurs in a call to Assembly.LoadFrom.Configuration is set to Debug x64. In this configuration all assemblies are set to...
View ArticleHow can I fix these errors I am getting in my program in C#?
Here's my program that I am working on:using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication2 { class Program { static void Main(string[]...
View Article