.net

how do I add a url parameter to a routelink in asp.net mvc?

All, my situation is that I have the basic route, plus some other simple routes: routes.MapRoute( "Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = 1} ); So the f...

C#: Bitmap Creation using bytes array

I am trying to dynamically create a Bitmap Image using byte array using following code Bitmap GetImage() { IntPtr ip = Marshal.AllocCoTaskMem(imagesize); //some code to fill ip Image img = new Bitmap( w, h, -stride, PixelFormat.Format24bppRgb...

Hide Error Report window

Hello guys! I have a following problem: My ASP.Net application receives a C++ source code of simple console programm, compiles it with cl.exe (command line VC++ compiler) and runs it using System.Diagnostics.Process. ASP.Net application runs on PC, which can be used for other work (it is not a server, just a working machine). I am hide r...

C#/.NET - Continuous Integration and FTP Deployment

Note: I'm a newb to Continuous Integration What is the "best" approach to get these functions: Build (assemblies and web app) Testing (MbUnit or NUnit) and if it passes tests deploy via FTP to the main server (internet). And what I mean by "best" is cheapest option, and easy to learn (low headache). ...

.NET Radiobuttons "content" design

I'm trying to decide the best way of having radiobuttons switch around the contents of a panel (or another container), using Windows Forms .NET (C#), and maintaining the ability to use the Visual Studio designer on the form/usercontrol that contains these. What I'd really like is something like the TabControl where I can select the page...

Project architecture, using DDD

Requirements Project should contain 1 main application and some secondary sub applications (which uses the same domain objects, has some shared services, but has some slightly different too - unneeded for main app, therefore - should be separated). There should exist shared search service (probably, in different DLL) over most of the ...

Backup Algorithm

I am looking at writing a program (.Net)for backing up files on a computer. How would I go on about knowing what files have changed to backup (I don't really want to scan the last modified dates each time. Are there any backup algorithms for backing up only the bits of a file have changed. What are the O notations for the algorithm? ...

To ASP.NET MVC or RESTful or WCF REST service

My client provides various data related to a consumers shopping habits in grocery stores based on their membership. One of their vendors wants to tap into the data and build an intranet site for the company. All my client is willing to provide is some form of web service so that the vendor could consume the data as they need and build ...

Send large byte arrays between AppDomains in the same process

I'm building a network server and starting a lot of AppDomains on the server to which requests are routed. What will be the fastest way to send off a request payload to one of the AppDomains for processing? Read in the payload from the socket into a byte array and marshal it. Marshal the network stream (inherits from MarshalByRef) to t...

How to convert SecureString to System.String?

All reservations about unsecuring your SecureString by creating a System.String out of it aside, how can it be done? How can I convert an ordinary System.Security.SecureString to System.String? I'm sure many of you who are familiar with SecureString are going to respond that one should never transform a SecureString to an ordinary .NET...

Using multi-threading to speed up .NET reflection

My PC have a dual core CPU and I was wondering - would it be possible to reduce .NET reflection times by two, if I start processing in a two thread. By "processing" I have meant the following: 1.loading the assembly 2.getting all types out of it (.GetTypes()) 3.processing these types 4.querying these types for methods etc. If yes - w...

Formating a portion of a text in datagrid

Hi I want to format portion of a text of a datagrid cell value. I am able to format the whole cell useing datagrid.rows[0].cells[0].style .... But i want to display part of the cell value in bold and part of the cell value in italics, etc. Is it possible ? ...

Implementing GetEnumerator in C++

In C# i have the following class and it compiles just fine: class CustomItem { } class CustomList : IList<CustomItem> { public CustomItem this[int index] { get { return null; } set { throw new NotImplementedException(); } } public void CopyTo(CustomItem[] array, int arrayIndex) { } ...

Text is getting selected when combobox style is drop down

I have a problem with windows combobox when the style is dropdown.the combox contains two values - "hello" and "Hi". I want to show the default value for my windows combobox is "Hello" when the page gets loaded. Now when the style is DropDown it selects the whole text("hello"), which creates confusion betweem first and third control(as f...

SMS Library for .NET

Anyone know of a free SMS library or webservice for .NET that will allow me to send text messages to people's cell phones? ...

Is C++ .NET dying?

I heard somewhere that Microsoft will be focusing their efforts on C# rather than C++ for the .NET platform. I can see signs of this being true because of the GUI designer that was available for C# but not C++. So I would like to know if C++ in .NET is dying and if it will continue to be second to C# in the future. ...

Get parent web not top level

Hi, I have make a custom lookup field and i lookup to the contacts in my top level site. but i want to lookup to a subsite. dataSource.List = site.RootWeb.Lists["Contacts"]; this is the code i used for the lookup but i reference to the rootweb and i don't want that. Someone? thx ...

How to get the underlying stdio FILE* of a managed System.IO.FileStream?

I'm writing a .NET adaptor for a C/C++ library where a method "bar" takes a regular stdio FILE*. Is it possible to build an interface so that managed code user can pass a managed (File)Stream? That is without creating an intermediary buffer and code to pipe the data between. Also does the assumption that bar() reads only make things any ...

How would you describe math in comments?

Well as the questions says... An equation might be more meaningful in its math-notated form than it is in code. Being able to put math in comments could improve readabibity on my projects. In .NET btw. ...

Crystal Report grow horziontal

We can set grow property of a field so it will grow with vertical wtith the content, How can we grow it in horizontal. ...