Click here to Skip to main content
15,889,859 members
Everything / .NET / .NET4

.NET4

.NET4

Great Reads

by Igor Ladnik
Wrapper to facilitate usage of TCP sockets
by Roman Kiss
This article describes a design, implementation and usage of the Custom Routing Manager for managing messages via Routing Service built-in .Net 4 Technology.
by Nish Nishant
An ExifReader class in C# that supports custom formatting and extraction. StyleCop compliant code, with demos for WPF and Windows Forms.
by defwebserver
How using the Silverlight DataTrigger allows you to run a process and then raise another when using View Model (MVVM)

Latest Articles

by Elmue
An easy to use 3D control which can be integrated into an application in a few minutes
by NikStar
Using OutgoingMessageProperties and OperationContextScope to implement authorization by http header for WCF client that communicates with non WCF-based web services.
by Ralf Meier
In this article, I demonstrate how to integrate Shelly® relays into my smart home, controlling the devices through routines in VB.NET.
by Sufyan S Jabr
All that you need to know when working with MSDTC, troubleshooting and problem solving.

All Articles

Sort by Updated

.NET4 

11 Apr 2010 by #realJSOP
Yes. Surface is written completely with WPF. There are plenty of details if you'd only use google.
5 May 2010 by #realJSOP
http://weblogs...
4 Jun 2010 by #realJSOP
The problem I think is that your tiNew variable is being reallocated, so the program has the same tab twice. You sholud write a method that creates a new TabItem and sets all the appropriate properties, and returns the TabItem to be added to the TabControl.Items collection.
15 Jul 2010 by #realJSOP
No, they can't. You have to use one of the apple-approved languages.
3 Oct 2010 by #realJSOP
1) Blend is a component design tool, not a programming tool. If you want to make make a window display another window, you have to write code to do it.2) Most of the time, you use data binding, but you can also just manually add items.
12 Nov 2010 by #realJSOP
If you're "skillful" in another language, why use C#?
9 Dec 2010 by #realJSOP
var can only be used inside a method/property. In other words, you can't get there from... ummm... there.
29 Dec 2010 by #realJSOP
No. That subject is way to broad to be answered here. The best thing you can do is develop some initiative and google ".Net 4.0". There are MILLIONS of results awaiting your perusal.
31 Jan 2011 by #realJSOP
Your only recourse is to obfuscate it, but even that can eventually be reverse engineered. There are A LOT of obfuscation tools out there. Google is your friend.
31 Jan 2011 by #realJSOP
I think you mean the UCMA API, and it appears as if you need v3.0 of the API in order to do DTMF. Google is your friend, but admittedly, you're going to have to look hard for the information you need. Microsoft does have a forum for this.
2 Feb 2011 by #realJSOP
Windows services don't typically interact with the desktop, mostly because a service can run when nobody is logged onto the box. If you need something to pop up at 4pm every day, I would write an application and add it to the Windows scheduler. As far as doing something on a schedule in a...
3 Feb 2011 by #realJSOP
Why is your main method in your Service class?
14 Feb 2011 by #realJSOP
Using WCF is much simpler, and there's a lot less code involved.As to your question, make sure that both machines are using the same port for comms. Also be aware that if a port is currently in use, the app running on that box will throw an exception. You could inadvertantly be leaving a...
15 Feb 2011 by #realJSOP
When you said "must be VB.Net", you pretty much automatically locked youself into Visual Studio (especially if you want the help resources of millions of developers all over the world). To say it's ubiquitous would be an understatement.You say it's going to run via a web form, soi I assume...
17 Feb 2011 by #realJSOP
Since you have to embed the siverlight app into the aspx page, why don't you pass that info in the querystring (I'd encrypt it as well)?
18 Feb 2011 by #realJSOP
Do you have an appropriate UriMapper element for the silverlight page in the MainPage.xaml of your silverlight app?
1 Apr 2011 by #realJSOP
Seriously, google is pretty damn handy:http://en.wikipedia.org/wiki/.NET_Framework[^]
5 Apr 2011 by #realJSOP
It shouldn't matter what version of .Net you use (as long as you're not using 1.n because that's just so freakin' old it's not worth considering). What you need to do is become familiar with how the OS implements the feature. If you stop and think about it, it's merely a scaled down version of...
8 Apr 2011 by #realJSOP
You have to put the OCX file in a MSI file and add a custom action to register the OCX file.
10 Apr 2011 by #realJSOP
0) When I create a class, the App_Code folder isn't automagically created for me.1) I've written a BasePage class that inherits from System.Web.UI.Page. When I type that out, intellisense doesn't change the color of Page like I'm used to (but it's not underlinedeither to indicate an...
21 Apr 2011 by #realJSOP
If you requested the file (I assume via the HttpWebRequest or WebClient objects), you should know the name of the file. In any case, just save the file with a temporary name, prompt the user for the name they want to use, and rename the temporary file.
9 May 2011 by #realJSOP
references you could have found on google (like I did)A reference to the different variations of the FTP protocol:http://www.rebex.net/kb/secure-ftp.aspx[^]A free third party library for ftp/ftps:http://starksoftftps.codeplex.com/[^]Google is free, and easy to use.
19 May 2011 by #realJSOP
Without knowing more about your code, I have to tell you that the way you're doing it is the only way. You *could* abstract out the comparisons into a few methods, but you'd have to design it carefully.
13 Jun 2011 by #realJSOP
Your code probably utilizes one or more obfuscated 3rd party libraries, and maybe even some native-code DLLs. Are you sure you have all of the files referenced by your application? What do you mean by "unspecified differences between 2.0 and 4.0? Can you supply one of the warnings you're...
25 Jun 2011 by #realJSOP
delete from table where column1=@column1 and column2=@column2...
30 Jun 2011 by #realJSOP
You probably have to set the selected item in the Accordion control itself (as opposed to setting IsSelected on the item itself.
4 Jul 2011 by #realJSOP
You can do it one of two ways:0) Handle the Left Mouse button Down event, and you can then retrieve mouse position at the time of the click. Then, you can open a form at that cursor position.1) Handle the button click event and position the for at the top/left corner of the button being...
7 Jul 2011 by #realJSOP
I found this with google:http://msdn.microsoft.com/en-us/library/ms973920.aspx[^]
7 Jul 2011 by #realJSOP
A web service doesn't hold the data. It provides read and/or write access to it. the data itself is stored in some sort of data medium, usually a database, but sometimes a flat file.If you want to use interop, you should create a .Net assembly that communicates with the web service, and...
30 Jul 2011 by #realJSOP
You do it the same way map any other file to memory. All you have to do is get the SpecialFolder name of the isolated storage folder, and you're off to the races.MSDN - Environment.SpecialFolder Enumeration[^]
1 Aug 2011 by #realJSOP
Did you even try googling this? I did (search phrase = "asp.net gridview with static header row"), and got 561, 000 results back, and this was the 2nd result returned.http://weblogs.asp.net/dwahlin/archive/2007/07/31/freeze-asp-net-gridview-headers-by-creating-client-side-extenders.aspx[^]
24 Aug 2011 by #realJSOP
I found this with google:You may need to set launch permission to the com component for the windows user the apppool is running as in IIS. You can do it by running: dcomcnfgand...And set file permissions so the user can read the COM dll file.Also check the COM's registration to...
28 Aug 2011 by #realJSOP
MSDN - Securing Services and Clients [^]
1 Sep 2011 by #realJSOP
Write a method in your code behind, put the if in there, and call your method from the markup.public void ControlEval(string evalThis){ if (pnlFeaturesText.Visible) { Eval(evalThis); }}and then you can do this:
8 Nov 2011 by #realJSOP
First, why are you creating a winform app? This should be a windows service so that it runs even when there is no user logged onto the system.Second, you should use a thread to perform the task, or even a BackgroundWorker...
17 Dec 2011 by #realJSOP
Are you aware that regular permutations don't do duplicates? Your data set of 9,1,3,9 will generate 16 permutations from an actual possible 24. If that's indeed what you're expecting, your permutation code can be just 14 lines of code (accounting for proper code formatting techniques)....
19 Dec 2011 by #realJSOP
If possible, the TryParse method populates the specified out variable. Before using the out variable, you need to check the retur n value of TryParse which indicates whether or not the conversion was succsessful. The reason TryParse exists is so that you don't have to rely on exceptions to...
27 Dec 2011 by #realJSOP
You should ask this question at the bottom of the article's page:How to create your own virtual machine[^]
4 Mar 2012 by #realJSOP
Why don't you just use the Array.CopyTo method?
15 Oct 2016 by #realJSOP
An article right here on CodeProject:An absolute beginner's guide to printing in .NET[^]
27 Dec 2016 by #realJSOP
If it's a local server, just use System.IO.File.Copy to copy the file. Depending on the machine running the code, you'll need the full DNC path to the other machine system/drive/folder. Of course, that won't work if you don't have the correct permissions.Your other option is to use the...
1 Oct 2017 by #realJSOP
The best solution is to stop using Crystal reports. :) (I'm not a Crystal Reports expert, but I did stay at a Holiday Inn Express last night.)
10 Apr 2020 by #realJSOP
A rewrite of a previous article with more liquid nitrogen and bacon
5 Apr 2013 by $aurabh Dhir
You have to add reference of using " system.windows.forms " to use messagebox.show feature.It very simple.for more questions mail me at " saurabhdhir3@gmail.com "
2 Oct 2013 by $ultaNn
I have created an EXE for my windows application , that exe is not running on other system which dosnt have .net framework 4i want create an exe that should take all dependencies and work on every system which dosnt have .net framework
19 Jun 2013 by -james
Being Dynamic in a Staticly Typed World
14 Nov 2014 by .Net Jim
Check this out...Faster MS Excel Reading using Office Interop Assemblies[^]
5 Jun 2012 by .net333
Good evening friendz... I am doing one big project with wcf services..i want to secure that wcf services with claim based security service...i studied the msdn document..but i didn't understand..i want a practical source code for that.... Thank You.....
6 Jun 2012 by .net333
Good evening friends.... I have the static templtes in my project...i want to edit the Static Templte and i want to insert this edited templtes into sql server 2008....my question is how can i Insert This edited template Html format code in Sqlserver 2008?Thanx in...
26 Nov 2014 by /\jmot
See this link..http://www.c-sharpcorner.com/UploadFile/0146e3/crystal-report-in-visual-studio-2010/[^]
1 Jul 2011 by 01.mandar
i have created a .mdf file in VS2010 and have connected to datagrid now how can i fire some queries and do update to the database and reflect the change on datagrid
24 Sep 2013 by 09hadi
Hi, I am kinda new to the whole integrating scene but what I want to know, is there a way one could embed a LightSwitch application creation suite inside an ASP.Net website. Any ideas or a lead would be greatly appreciated.
20 May 2009 by 0x3c0
You can use boolean operators, like the && operator instead of the two 'where' clauses, and the | operator for an OR operation. For example, your first example would be:var results = from items in collection where...
15 Nov 2010 by 10Tec, Sergey Gorbenko
Tool for creating MS Visual Studio documentation files - XML Summaries, HxS/MSHC help solutions and manuals.
28 Aug 2014 by 1arch1
I have a package with a task used SEND MAIL Task, but its executing fine till it approach to send mail task and display an error. Which is [Send Mail Task] Error: An error occurred with the following error message: "Syntax error, command unrecognized. The server response was: 5.0.0 Your email...
26 Jul 2013 by 2006 Flauzer
I'm developing a C# assembly which is to be called via COM from an old vb6 (ie, "native" win32, not .net) application. I've installed VS2010 Premium in a W7 x64 and simply my goal is to use Visual Studio to debug the C# code...Other hint: the C# assembly is compiled in "x86 mode" (.NET4)...
29 Jul 2013 by 2006 Flauzer
From menu Debug->"Attach to.." option, please point the correct process ie, dllhost.exe COM Surrogate. and not win32 client....
6 Jul 2011 by 2irfanshaikh
Please check the below linksGridView Custom Paging[^]Advanced Paging GridView with ASP.NET 2.0/3.5[^]
20 Jun 2012 by 2irfanshaikh
Please check the below link:http://msdn.microsoft.com/en-us/magazine/gg598930.aspx[^]&Making a Voice Recorder on Windows Phone[^]
29 Jul 2009 by 333mmm
At the bottom I have pasted in an XML file I am working with.   My goal is to query this file using LINQ to XML and have the response formatted as follows:reportDate            alias24         alias392009-05-27         138,385.11     ...
3 Nov 2010 by 51318402
I want to create an application which display all hard drives. After selecting a hard drive user should be able to lock it by giving a password, without correct password no contents of that drive should be displayed anywhere in the pc
3 Nov 2010 by 51318402
Thanks for your quick response Nishant. I found one desktop application (http://www.fileheap.com/dbquery/1/hard+disk+password+protection+source+code)Its pretty interesting and i want to develop my application same as like the above. But not getting any solution yet...
30 Aug 2015 by 9000605667
I want to store the C# object in DataBase and retrive that from DB.How many ways are there to achieve this.
8 Aug 2011 by 94HellGate
i just found a piece(not enought to find it out) of code and i'm wondering how i can do this, because it's much better than a normal event in my caseconsole.BindCommand("!", delegate(GameTime gameTime, string[] args) { console.WriteLine(args[0]); ...
12 Jul 2012 by __TR__
You can Create 2 tables tblBill and tblBillDetailtblBill will store information like customerID, BillDate or any other field that will be same for a bill.tblBillDetail will store the Bill details like no. of items purchased (Quantiy), unit price of each item(UnitPrice), Total amount of...
12 Dec 2012 by __TR__
Check these CP articlesCreating a Watermarked Photograph with GDI+ for .NET[^]How to Create watermarked images in C# ASP.NET ?[^]
23 May 2012 by __Untitled
I have a web service, the client program can post a key to one of its web method, and the method will return {"key-client-post", "value-from-server-side"}, the structure of return string is fixed, but the key name is dynamic, it depends on the client program.My question is how I can...
10 Jun 2012 by __Untitled
I am writing a GroupSMS app on Windows Phone, and I want to create a group and add some contacts into it, then serialize the group to isolatedstorage file, so that I can get the group information next time when app restart. My question is how can I Serialize and Deserialize List or...
4 Aug 2012 by _Amy
Hi,In button1 click event add the TextBox like:TextBox t1 = new TextBox();t1.ID = "TextBox1";TextBox t2 = new TextBox();t2.ID = "TextBox2";Panel1.Controls.Add(t1);Panel1.Controls.Add(t2);//Now your both textboxes are added into panel.//You can add it wherever you want.In...
5 Aug 2012 by _Amy
You should use DirectX.Capture Class Library[^].--Amit
5 Aug 2012 by _Amy
Hi,I could have written the code which can solve you problem, but I would like to suggest you to read GridView Paging and Sorting[^]. This is a very nice article for the beginners.--Amit
8 Aug 2012 by _Amy
Hi,Try this:window.open('../Test1.aspx', null, 'height=500, width=1100, status=no, resizable=no, scrollbars=yes, toolbar=no,location=no, menubar=no');[Edited]:, null,...
27 Feb 2013 by _Amy
You can try using :MyGridView1.SelectedIndex = -1; But this is a server side code. You need to fire this on JavaScript page click event(Use __doPostBack( 'target', 'args')). Also check : How to use __doPostBack function[^].--Amit
24 May 2013 by _Amy
This is because your database is from SQL Server 2012. The only way to resolve this as I found is to Generate Script from SQL Server 2012 then run it in SQL Server 2008 R2.--Amit
4 Jun 2013 by _Amy
You should start from : http://en.wikipedia.org/wiki/Multitier_architecture[^]See the links below:N-Tier Architecture and Tips[^]N-Tier Application Architecture[^]Creating ASP.NET Applications with N-Tier Architecture[^]Architecture Guide: ASP.NET MVC Framework + N-tier + Entity...
14 Oct 2015 by _Amy
You can use user32.dll and LASTINPUTINFO[^] to calculate the system ideal time.Here is the similar threads:How to calculate system idle time out and put the machine to sleep?[^]Getting the user idle time with C#[^]System Idle Time Detection in C#.Net[^]--Amy
22 Jul 2013 by _Asif_
check this linkhttp://msdn.microsoft.com/en-us/library/ms175113.aspx[^]
6 Aug 2013 by _Asif_
Try this int number = 1234;//D6 = pad with 000000string outputValue = String.Format("{0:D6}", number);
12 Jul 2015 by _Asif_
Use this Link[^] to do what you want.
26 Jul 2015 by _Asif_
A basic sample with good explaination can be found here![^]
13 May 2013 by _Damian S_
How about select left(FIELDNAME, 50) as AddressPart1 from TABLENAME
6 Aug 2012 by _DanV_
How to dynamically add controls on a hierarchical structure on MVC.
16 Jun 2016 by _eol_
This article presents the minimal code necessary to display a hierarchical tree using Popups.
27 Sep 2016 by _eol_
The goal of this article is to create flat image buttons with bindable properties.
27 Feb 2013 by _Maxxx_
You can subscribe to SMS gateway services that will send and receive SMS messages to/from a server with an API you can use to interact with it.So, you can develop the system you require, using the SMS server as your interface to the SMS world.Your local telecoms provider(s) should e able...
14 Jan 2014 by _Maxxx_
Try this[^]
4 Oct 2013 by _Noctis_
Showing how to use and tweak the DateTimePicker control
15 Jun 2014 by _Noctis_
This will set you logging from your NLog to your Growl in no time.
3 Aug 2012 by _Zorro_
Hi,Try innerText/innerHTML instead of InnerText/InnerHTML.Or try this: http://www.permadi.com/tutorial/jsInnerHTMLDOM/index.html[^]Hope it helps.
3 Nov 2013 by A-MaxLee
HI to all... I will like to ask that got any reference such example, project, codes and so on that I can refer if I'm preparing to developing a family budget system for my final year project???Reply are welcome~~ Thank you
7 Jun 2014 by A. Najafzadeh
Saving zip files in access database with encrypting bytes when file saved in access database and decrypting bytes when extracting files from database . . .
28 May 2014 by A.Girish
Hello Buddies,I want to ask every one who cares for knowledge instead of money.What is this Pattern Practises meant for?how it is useful?If it is useful from where i have to start..Plz any one suggest me because it is difficult for me to start and get understand about it..
28 May 2014 by A.Girish
Hello friends,I want to ask about async and await.i heard about synchronization, lock,asynchronization (I'm not sure whether it is from java) how all these are differentiate each other.how it is different from threads.even though i find this in Internet you solutions clears my doubt...
22 Sep 2013 by a.pkumar
Hi, I had a problem while running my application. Early morning my application run perfectly. suddenly system was struck and re-stared system. from then getting the following errorCould not load file or assembly 'MessageMedia' or one of its dependencies. The parameter is incorrect....
22 Sep 2013 by a.pkumar
yes got it, i don't no what the problem. got ddl's from other system and executed application, working fineThanks
15 Oct 2013 by a.pkumar
I am getting below ERROR IN PACKAGE MANAGER CONSOLE SCREEN when i type the PM >Install-Package Facebook -Version 6.1.2 COMMAND-----------------------PM> Install-Package Facebook -Version 6.1.2 Install-Package : The remote name could not be resolved: 'az320820.vo.msecnd.net'At line:1...
17 Oct 2013 by a.pkumar
Hi Experts,I Searched in google i found code but it shows error
18 May 2014 by a_pess
Demonstrates how to retrieve resources from a .NET Assembly in Visual Basic .NET
27 Nov 2012 by Aadhar Joshi
Creating job in sql server which automates taking backup of all stored procedures and functions in physical drive.