This post will show how to return a simple Json result from an ASP.NET MVC 2.0 web project. It will show how to test that result inside a unit test and essentially pick apart the Json, just like a JavaScript (or other client) would do. It seems like it should be very simple (and indeed, [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
This post will show how to return a simple Json result from an ASP.NET MVC 2.0 web project. It will show how to test that result inside a unit test and essentially pick apart the Json, just...
This site is a resource for asp.net web programming. It has examples by Peter Kellner of techniques for high performance programming...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
I see there are large number of grid frameworks in CSS like 960, heroku grid, etc being used by huge websites. I want to know whether using grid structure is really useful? If yes, then how?
One of the biggest problem I saw with grid is having equal heights for elements. If we are using three grids like grid_2, grid_7, grid_3 for 3 vertical panels then it becomes very difficult to have these three panels positioned in a way such that they have equal heights and all of them change height when any of the content exapnds or collapse.
This is because elements are floated in grid system and they don't change height along with neighbouring element.
Here’s a feature for all your users who are keyboard ninjas. The ASPxPager control now provides better keyboard support - increasing both web site usability and accessibility.
If you are using a DevExpress ASP.NET Pager control - either standalone or integrated into our data-aware controls like the ASPxGridView – then you can now navigate to the previous/next page by pressing the CTRL+ARROW key combinations.
To see a standalone version of our ASP.NET Pager, check out this slick movie-theme...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
La dernière version de la branche 4.6 en date propose une nouvelle démonstration des fonctionnalités de Qt : un analyseur de spectre, déjà présenté sur les blogs des Qt Labs. Qu'attendiez-vous de cette nouvelle version ?
I am designing a new system that has one central web service and several site web services which are spread across the country and some overseas. It has some data that must be identical on all sites.
So my plan is to maintain that data in the central web service and then "sync" the data to sites. This includes inserts, edits and deletes.
I see a problem when deleting, if one site has used the record, then I need to undo the delete that has happened on the other servers. This lead me to idea that I need some sort of transaction system that can work across different web servers.
Before I design one from scratch, I would like to know if anyone has come across this sort of problem and if there are any frame works or even design patterns that might aid me?
Sharp DOM is a view engine for ASP.NET MVC platform allowing developers to design extendable and maintenable dynamic HTML layouts using C# 4.0 language. It is also possible to use Sharp DOM project to generate HTML layouts outisde of MVC framework....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
The new MS Office and SharePoint release is just around the corner, and I want to assure everyone that we will provide full support for SP 2010 in our next RadControls release - Q2 2010. We have already put up a page with information about the new SP release. You can find all the information you need at the SharePoint product page on our site. In this post I will talk about the ASP.NET AJAX controls, but as you will see on the product page, we will also offer support for our Silverlight UI controls. The most important thing I want to share is that the RadEditor for MOSS product will updated for the 2010 version and you can already get a beta version from your account (provided you have a license for the ASP.NET AJAX controls). We still have some work to do in the WCM scenario, but ...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
Hi
i have a folder with symlinks:
marek@marek$ ls -al /usr/share/solr/
razem 36
drwxr-xr-x 5 root root 4096 2010-11-30 08:25 .
drwxr-xr-x 358 root root 12288 2010-11-26 12:25 ..
drwxr-xr-x 3 root root 4096 2010-11-24 14:29 admin
lrwxrwxrwx 1 root root 14 2010-11-24 14:29 conf -> /etc/solr/conf
i want to copy it to ~/solrTest but i want to copy files from symlink as well
when i try to cp -r /usr/share/solr/ ~/solrTest
i will have symlink here:
marek@marek$ ls -al ~/solrTest
razem 36
drwxr-xr-x 5 root root 4096 2010-11-30 08:25 .
drwxr-xr-x 358 root root 12288 2010-11-26 12:25 ..
drwxr-xr-x 3 root root 4096 2010-11-24 14:29 admin
lrwxrwxrwx 1 root root 14 2010-11-24 14:29 conf -> /etc/solr/conf
Ive always wanted a place that I could look through to find what .net events are going on in Northern California. Ive found that there is a core group of people with common interested...
This site is a resource for asp.net web programming. It has examples by Peter Kellner of techniques for high performance programming...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
Today's $10 deal of the day at http://www.apress.com/info/dailydeal is
Ultra-Fast ASP.NET: Building Ultra-Fast and Ultra-Scalable Websites Using ASP.NET and SQL Server by Richard Kessig - ISBN 978-1-4302-2383-2
I won a copy of this book at 101 Books. Richard Kessig is an all-star member of forums.asp.net - see http://forums.asp.net/members/RickNZ.aspx
"
Ultra-Fast ASP.NET provides a practical guide to building extremely fast and scalable web sites using ASP.NET and SQL Server. It strikes a balance between imparting usable advice and backing that advice up with supporting background information.
$49.99 | Published Nov 2009 | Rick Kiessig"
Check PokeIn for powerfull .Net based
DWR like comet support. It's in CodePlex, easy and free to use!...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
Sharp DOM is a view engine for ASP.NET MVC platform allowing developers to design extendable and maintenable dynamic HTML layouts using C# 4.0 language. It is also possible to use Sharp DOM project to generate HTML layouts outisde of MVC framework....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
I have been developing a game using Kinect + XNA and using Microsoft Audio Creation tool (XACT3) for managing my sound files and music, however in the code an SEHException is thrown whenever it tries to get the wave file from the wave Bank . . Sometimes the code works magically and all of a sudden it will start throwing this exception randomly ..I need a help on solving this exception
/*Declaring Audio Engine for music*/
AudioEngine engine;
SoundBank soundBank;
WaveBank waveBank;
Cue cue;
/*Declaring Audio engine for sound effects*/
AudioEngine engine1;
SoundBank soundbank;
WaveBank wavebank;
Cue effect;
engine = new AudioEngine(@"Content\therapy.xgs");
soundBank = new SoundBank(engine, @"Content\Sound Bank.xsb");
**waveBank = new WaveBank(engine, @"Content\Wave Bank.xwb");**
cue = null;
engine1 = new AudioEngine(@"Content\Music_Manager\Sound_effects.xgs");
soundbank = new SoundBank(engine1, @"Content\Music_Manager\Sound1.xsb");
**wavebank = new WaveBank(engine1, @"Content\Music_Manager\Wave1.xwb");**
effect = null;
cue = soundBank.GetCue("hypnotizing");
cue.Play();
Programming for WSS or Sharepoint through .Net...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
An ASP.NET rating control....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
The article introduces an innovative approach to develop web forms in enterprise software rather than either ASP.NET or MVC through step by step comparison on development complexity, reusability, performance and maintainability. The approach is implemented as an important UI component of RapidWebDev...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
I'm going to be creating a site for a business with the following:
Single Item purchases with Paypal, Google Checkout and Amazon Checkout
Digital Downloads for members from a CDN
Forum
Voting on different items
While that seems rather simple having to deal with the three different payment gateways is a big pain in the ass. Django has a great payment library which works for all three but I'm not able to find one for any of the PHP frameworks.
Anyone have any suggestions?
I'm posting here as suggested by someone at Stackoverflow.
The website www.imsuperb.com is looking for an ASP.NET developer to help them out with a site update. This is a contract position that could lead to a full time job. Contact Nick Lynch at [email protected] you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
About
ASP.Net MVC
The
ASP.Net MVC is the framework provided by Microsoft that lets you develop the
applications that follows the principles of Model-View-Controller (MVC) design
pattern. The .Net programmers new to MVC thinks that it is similar to WebForms Model (Normal ASP.Net), but it is far
different from the WebForms programming.
This article will tell you how to
quick learn the basics of MVC along with some frequently asked interview
questions and answers on ASP.Net MVC
1.
What is ASP.Net MVC
The ASP.Net MVC is
the framework provided by Microsoft to achieve
separation of concerns that leads to easy maintainability of
the application.
Model is supposed to handle data
related activity
View deals with user
interface related work
Controller is meant for managing the
application flow by communicating between Model and View.
Normal
0
false
false
false
EN-US
X-NONE
X-NONE
2. Why to use ASP.Net MVC
The strength of MVC (i.e. ASP.Net MVC)
listed below will answer this question
MVC reduces the
dependency between the components; this makes your code more testable.
MVC does not
recommend use of server controls, hence the processing time required to
generate HTML response is drastically reduced.
The integration of
java script libraries like jQuery, Microsoft MVC becomes easy as compared to
Webforms approach.
3. What do you mean by Razor
The Razor is the new View engine introduced
in MVC 3.0.
The View engine is responsible for processing the view files [e.g. .aspx,
.cshtml] in order to generate HTML response.
The previous versions of MVC were dependent on ASPX view engine.
4. Can we use ASPX view engine in
latest versions of MVC
Yes. The Recommended way is to prefer
Razor View
5. What are the benefits of
Razor View?
The syntax for server
side code is simplified
The length of code is
drastically reduced
Razor syntax is easy
to learn and reduces the complexity
Normal
0
false
false
false
EN-US
X-NONE
X-NONE
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
6. What is the extension of Razor
View file?
.cshtml (for c#) and .vbhtml (for vb)
7. How to create a Controller in MVC
Normal
0
false
false
false
EN-US
X-NONE
X-NONE
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
Create a simple class and extend it
from Controller class. The bare minimum requirement for a class to become a controller is to inherit it from ControllerBase is the class that is required to
inherit to create the controller but Controller class inherits from ControllerBase.
8. How to create an Action method in MVC
Add a simple method inside a controller
class with ActionResult return type.
9. How to access a view on the
server
The browser generates the request in
which the information like Controller name, Action Name and Parameters are
provided, when server receives this URL it resolves the Name of Controller and
Action, after that it calls the specified action with provided parameters. Action
normally does some processing and returns the ViewResult by specifying the view
name (blank name searches according to naming conventions).
10. What is the default Form method
(i.e. GET, POST) for an action method
GET.
To change this you can add an action level attribute e.g [HttpPost]
Normal
0
false
false
false
EN-US
X-NONE
X-NONE
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
11. What is a Filter in MVC?
When user (browser) sends a request to server
an action method of a controller gets invoked; sometimes you may require executing
a custom code before or after action method gets invoked, this custom code is
called as Filter.
12. What are the different types of Filters
in MVC?
a. Authorization filter
b. Action filter
c. Result filter
d. Exception filter
[Do not forget the order mentioned
above as filters gets executed as per above mentioned sequence]
13. Explain the use of Filter with
an example?
Suppose you are working on a MVC application
where URL is sent in an encrypted format instead of a plain text, once encrypted
URL is received by server it will ignore action parameters because of URL
encryption.
To solve this issue you can create
global action filter by overriding OnActionExecuting method of controller class, in this you
can extract the action parameters from the encrypted URL and these parameters
can be set on filterContext to send plain text parameters to the actions.
14. What is a HTML helper?
A HTML helper is a method that returns string;
return string usually is the HTML tag. The standard HTML helpers (e.g. Html.BeginForm(),Html.TextBox())
available in MVC are
lightweight as it does not rely on event model or view state as that of in ASP.Net
server controls.
While creating Web Setup, Visual J# .NET automatically included in the MSI package.When we install this MSI on a server machine which does not have Visual J# .NET installed, installer prompts a message to install Visual J# .NET.
Usually we dont need to install Visual J# .NET and it can be avoided to add into installer. To do this:-
- Open setUp project (.vdproj) file in a text editor.- Find below section for LauchCondition for Visual J# .NET and remove it."LaunchCondition" { "{836E08B8-0285-4809-BA42-01DB6754A45D}:_237E8F40F1A4464FBD27D8992CFDD623" { "Name" = "8:Visual J# .NET" "Condition" = "8:REQ_VJSLIB_VER_PRESENT = \"TRUE\"" "Message" = "8:[VSDVJSMSG]" "InstallUrl" = "8:http://msdn.microsoft.com/vjsharp" } "{836E08B8-0285-4809-BA42-01DB6754A45D}:_DF1CA2119CD64D4B94CE993CF1624ACE" { "Name" = "8:IIS Condition" "Condition" = "8:IISVERSION >= \"#4\"" "Message" = "8:[VSDIISMSG]" "InstallUrl" = "8:" } }- Save .vdproj file and Build again to generate new MSI installer.- Install the MSI on a new machine again where J# does not exist, It should not prompt the same message to install J#.
Retrieving & Processing HTML from Websites in .Net Applications...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.
I'm trying to extract a tar archive to a specific directory. I've tried using -C flag but it doesn't work as expected. Here is the commandline I'm using
tar xvf myarchive.tar -C mydirectory/
This gives me a following error:
tar: file -C: not present in archive
tar: file mydirectory/: not present in archive
I've also tried setting the -C flag before the archive file but it just says this:
tar xvf -C mydirectory/ myarchive.tar
tar: -C: No such file or directory
What am I doing wrong?
EDIT:
tar -tf shows that the tar archive does not have full path names:
tar -tf myarchive.tar
herareport/
herareport/bin/
...
In the C++ project I am working for we would like to use something like
Scala actors and remote actors (see e.g. this tutorial).
Being able to use remote actors (actors living in different processes,
possibly on different machines and communicating via TCP/IP) has
higher priority for us because we have an application consisting of several
processes deployed on different machines.
Being able to use several actors living in the same process
(possibly different threads) is also interesting, but has lower priority
for the moment.
On wikipedia I have found some links to actor libraries for C++ and
I have started to look at Theron. Before I dive too deep into the details
and build an extended example with Theron, I wanted to ask if anybody has
experience with any of these libraries and which one they would recommend.