Hi
Basically I have this
In my Asp.net controller
public ActionResult RenderMyView()
{
data = // some data to used in rendering my partial view
return PartialView("PartialView", data);
//edit
I also return a json result if an error occurs. Say if I get an SQLException I will return a json result back and not render any part...
Hi, I'm doing a homework project that requires this:
Below you will find the code that I have written to compute the square root of a number using the Newton-Raphson method. Include it in your project. For this project your job will be to write a test harness that tests the code that I have written. Carefully read the method prologue to...
Forgive me if this is a duplicate, but it's a minor issue for me and I can only spend so long on my curiosity. Why is it that when I use an implicitly typed loop variable in a foreach block, I get no Intellisense? The inferred type seems to be quite obvious.
I am using ReSharper, but when I switch the Intellisense to VS I get the same...
Hi All
I am trying to create an ASF file using 3 streams :
1) A regular script stream
2) A regular Audio stream (WaveEx)
3) A custom stream consisting of packets that represent a certain kind of compressed screen data (Motorolla Netopia if you are familiar with it). The data is just a byte[] array.
Writing the first 2 streams wo...
I am getting a NullReferenceException when I try and convert the following LINQ to EF query. What could be wrong here?
List<DailyProductionRecord> prodRecs = new List<DailyProductionRecord>();
var recs = from p in productionEntities.DailyProductionRecordSet
where ((p.Department.DeptId == d...
I'm struggling to decide on a good way to structure my object model / web services in a webapp I'm working on. We have a common issue where different pages need a slightly different view of a standard object. For example, we have Team and an Organization types where an Organization can have one-to-many Teams. On one page all I need is...
I see a lot of asp.net projects coupled with mssql2005 and mssql2008. Most of them don’t use MySQL for some reason.This is even true when an ORM like nhibernate is being used.
Is this a pattern only to me or are there quite a lot of asp.net projects with MySQL as the db?
If this is true, what might be the reason for not choosing M...
Hi,
I'm building a small WPF application. For the layout in the application, i use a grid with two columns and two rows. I want to have a background rectangle that fills the entire application, and I want the background rectangle to strech so if a user resizes the window, the rectangle streches and always fills the entire window. So ins...
Yes, this has been asked before here and here. I'm curious as to whether the approach I'm considering is architecturally sound.
Let me start off by trying to describe what I'd like to be able to do with my object model:
class Person {
ISet<Roles> Roles { get; set; }
}
class RoleDefinition {
string Name { get; set; }
}
class RoleA...
Many product developers want to write a .NET application which will work seamlessly with any popular RDBMS like SQL server, oracle, DB2 , MySql. If we use the Data application block it dynamically picks the database driver (OracleClient, SQLClient or OleDBClient) based on configuration.
However, all databases have their own flavours of...
Hi, I need to read records from a employee database and display selected items (not in Gridview) - this is fine except for the image that is stored in varbinary(max). I need to step through the records - forwards and backwards. There are some records that has not image.
I am having problems understanding the convertion method using that ...
I'm trying to do a dump to XML of a very large database (many gigabytes). I'm using Linq-to-SQL to get the data out of the database and Linq-to-XML to generate XML. I'm using XStreamingElement to keep memory use low. The job still allocates all available memory, however, before keeling over without having written any XML. The structure l...
I would like to better understand how .Net http connection reuse works.
When I use HttpWebRequest to send something to some server twice from the same appdomain, is the connection (optionally) reused? So the server would see both requests as coming from the same connection even though in my application they are different logical reques...
As as human I always thought that lookup in something sorted is the way faster than lookup in not sorted.
But looking at this http://dotnetperls.com/sorteddictionary I can say that I was wrong.
Maybe anyone can explain why it is so ?
...
I'm writing a simple data UI using standard .Net databinding to a typed DataSet from SQL Server.
I have a reload button which calls Fill on all of the DataAdapters to get new data from the database (in case another user changed the data).
This takes some time, during which the UI is frozen. It must be run on the UI thread or the datab...
Hello,
I recently tried running a .NET application on 64bit versions of Windows and was surprised to notice that all my HttpWebRequest.GetResponse() calls to web services on my local network were talking huge (around 500ms) time to complete. Here's a few info regarding my test setup:
.NET 3.5
Windows Vista Home Premium 32bit, Windows...
Hi
I had to change on my lines of code around. I before had something like this
// this is in a static method.
List<string> mySTring = new List<string>();
mySTring.add("one");
mySTring.add("two");
However on one of my pages I have a dropdownlist that does not require the field "two" so instead of writing duplicate code all I did was...
I found a fairly complex function in a greasemonkey script that i would like to use in my C# app. Basically i am parsing a page and i need to collect all or 4 members of var avar = {}; (i havent done this yet but they are all strings using var avar.name = "val")
Then i need to call the gm func which returns a string and takes in 3 strin...
Hi folks,
I wish to pass some data to the delegate method, of a Process object, when it fires the Exited event --- i'm not sure how.
I've got some code (in a windows service) that is going to take a while .. so i'm forking off a new process to do it .. like ...
string recipientEmail = "[email protected]";
var commandProcess = new P...
Title should explain what I'm looking for.
I need to learn everything from the ground up. I've spent a day or two learning how to make windows forms applications, the basic functionality, but now I need to connect to a database and do some more advanced stuff and I am so lost. So something that goes slow and doesn't omit the basics be...