Sunday, 23 February 2014

Could you please explain, how to use Cursors ?

  1. Declare a CURSOR
  2. OPEN a CURSOR
  3. FETCH data in CURSOR
  4. finally close CURSOR
DECLARE @AccountID INT
DECLARE 
@getAccountID CURSOR
SET 
@getAccountID = CURSOR FOR
SELECT 
Account_IDFROM AccountsOPEN @getAccountIDFETCH NEXTFROM @getAccountID INTO @AccountIDWHILE @@FETCH_STATUS = 0BEGIN
PRINT 
@AccountIDFETCH NEXTFROM @getAccountID INTO @AccountIDEND
CLOSE 
@getAccountIDDEALLOCATE @getAccountID

What is a Manifest?

An assembly manifest contains all the metadata needed to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a PE (Portable Executable) file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE (Portable Executable) file that contains only assembly manifest information. The following table shows the information contained in the assembly manifest. The first four items the assembly name, version number, culture, and strong name information make up the assembly's identity. 
Assembly name: A text string specifying the assembly's name. 
Version number: A major and minor version number, and a revision and build number. The common language runtime uses these numbers to enforce version policy. 
Culture: Information on the culture or language the assembly supports. This information should be used only to designate an assembly as a satellite assembly containing culture- or language-specific information. (An assembly with culture information is automatically assumed to be a satellite assembly.) Strong name information: The public key from the publisher if the assembly has been given a strong name. List of all files in the assembly: 
A hash of each file contained in the assembly and a file name. Note that all files that make up the assembly must be in the same directory as the file containing the assembly manifest. 
Type reference information: Information used by the runtime to map a type reference to the file that contains its declaration and implementation. This is used for types that are exported from the assembly. 
Information on referenced assemblies: A list of other assemblies that are statically referenced by the assembly. Each reference includes the dependent assembly's name, assembly metadata (version, culture, operating system, and so on), and public key, if the assembly is strong named.

What is Lock Escalation?

Lock escalation is the process of converting a lot of low level locks (like row locks, page locks) into higher level locks (like table locks). Every lock is a memory structure too many locks would mean, more memory being occupied by locks. To prevent this from happening, SQL Server escalates the many fine-grain locks to fewer coarse-grain locks. Lock escalation threshold was definable in SQL Server 6.5, but from SQL Server 7.0 onwards it’s dynamically managed by SQL Server.

All About Internet Marketing

Let me first explain in short where we stand today. Internet marketing has become the most important tool and the most valuable part of an marketing plan of any prospering business today. This is true especially in the tourist and particularly in the scuba diving and accommodation industry. And that’s where we come in! We specialize since many years in promoting dive centers, resorts and hotels. Right now, at this very moment, thousands of potential customers are using the internet to search for scuba diving courses, diving equipment and new dive sites, they search for diving vacations, diving lessons and other scuba diving related keywords and phrases in other words, they search the very things YOU offer! Now, if your website is not on the first page of Google, it’s your loss! And this means that the time as come to move things forward and ask yourself some serious questions about your internet marketing strategies, and make sure you get the right answers! Here are the most important ones.

1. Search Engine Optimization (SEO)

The most imminent questions must be;
  • Will your potential customers find YOU before they find your COMPETITORS?
  • Are you on the first page of Google when you search for your product and services with the top key phrases?
  • Do you know how many websites link back to your website; more than to your competitors?
  • Is your site really search engine optimized in every possible way?
But not enough with these 4 important questions. If it where that easy, we would soon be out of a job! Once your website is optimized for search engines, you need to do a more things to gain top positions for your website. Therefore there will be a few more questions you must ask yourself here:

2. Selling and Following Up

  • First of all; does your website sell your products and services, or do you only get an inquiry every then and when?
  • Do you have quality content (text, images, video) on your website to attract visitors and keep them busy on your site for as long as possible?
  • Does your website show an appealing description in the search results pages of Google so that people want to click on it?
  • Do you have a good punchline on your website, letting you stand out and making you different from your competitors?
  • Does your site have a great looking landing page where visitors are invited to contact you with only one easy click on a button?
  • Does your landing page have a “Call to Action” button that literally screams “CLICK ME”?
  • Is it from every page ‘one click’ easy to contact you through your website?
  • Is your website easy to navigate, can all important pages be found and accessed easily?
  • Do you still have a business email address ending with @hotmail.com or @yahoo.com or a gmail address instead of your domain name?
  • Can visitors easily sign up for your newsletter and do you send regularly newsletters to your customers?

3. Syndication of your Website

Get it Out there! Once you got the above two points right, it’s time to syndicate your website and use social media marketing and social network marketing to bring your business up to speed;
  • Is there a well visible place on your site, where visitors can sign up for your newsletter, so you can follow up with your offers?
  • Are there social bookmarking and social media buttons or widgets on your web pages, so visitors can tell their friends about you and share your site on their Facebook profile?
  • Do you have a business page on Facebook with leads visitors from Facebook to your website?
  • Do you have a RSS feed like Google Feedburner installed on your website which syndicates your content in the modern internet?
  • Are you using Onlywire or other social bookmarking services to distribute your content throughout the social networks?
  • Are you pinging new content so it can be easily picked up by search engine bots as soon as you published it?
  • Are you on Twitter and are you regularly tweeting?
  • Do you write a press release about your diving business at least every three month?
  • Are you using Google Maps to rank in local searches?

4. Tracking your Results

After you answered all the previous questions about internet marketing, SEO and your website with yes, you’re not yet exactly finished. Now that everything is set to perfectly work, we need to know what’s going on as soon as the first results run in which means it’s time for result tracking, so that your efforts will be rewarded and you can make corrections to your campaigns to make them even more successful. The questions you must ask here are as follows:
  • First and utmost; is the Google tracking code installed throughout your website?
  • Do you have additional and accurate statistics installed for your site?, to not only trust one source of result tracking
  • Do you know where your visitors come from and what pages on your site they stayed on longest?
  • Do you use Google AdWords to test your campaigns and landing pages?
  • Have you got Free Live Chat installed on your website?
  • And finally; can you see the return of interest (ROI) of your efforts in your online marketing campaigns?

Fact is, there are Five Places in the Internet where your business MUST be seen!

Today everyone uses Google, Youtube, Twitter and Facebook to search for whatever they desire, don’t you too? For dive centers, sailing charter, hotels and other accommodation businesses, there is fifth entity that you simply cannot overlook anymore; TripAdvisor! We like to call them the big five. Sure, there is Yahoo and Bing and thousands of social networks around the web, but all of them together will never be able to drive as many potential clients to your website as the big five will do, not when you’re in the tourist industry at least.. Once you have a great website and you are at the first page of Google, on a top spot of Youtube and have a well made Facebook page, all other search engines and many networks will pick your site up automatically or with far less extra effort.

How to get there

Now, if you have come that far in my article and you remain with one last question in your head saying: “How in the world am I going to do all this; I have a JOB!?” No worries, we can help! ONE Internet Marketing Co., Ltd. is very successful in internet marketing for dive centers, accommodation and sailing on the big five, for many years now. We are highly passionate about online marketing and we know almost every place on the internet that could sell or promote your dive center or dive school. We also achieve top rankings in Yahoo, Bing and other search engines, although we use many social networks such as Taucher.net Twitter, Blogspot and WordPress, to promote our clients services. Our main efforts will always go towards the big five, simply because the majority of the people will sooner or later search there too if they haven’t come there in the first place. Wherever they may search for scuba diving courses or their next diving holiday destination, as long as it is in the internet, they will sooner or later search on Google, Youtube, Facebook or TripAdvisor too.

Reaching beyond Internet Marketing – Complete Internet Marketing Solutions

We’re not just an internet marketing company, we are your personal full service online marketing partner – All in ONE for an affordable price! is our Motto. We live and breathe the internet and will explore every opportunity online to generate sales for your dive center. You will save time, stress & money by consolidating all your internet needs with one trusted company. ONE Internet Marketing is rapidly expanding the team of professionals who have years of experience in Internet Marketing & SEO, as well as in scuba diving on professional level!

About Internet Marketing Prices

Our prices are far lower than our competition, I can tell you that right away! The reason for this is rather simple. While we deliver the same quality work as a company in New York City, we choose to live on a place where expenses are lower than in the US or in Europe, while the technical backbone and the living standard remain the same. This does nothing but positively influence our work and our enthusiasm in the subject of diving. We are situated in Koh Tao and Koh Phangan, in Thailand and we are basically surrounded by dive centers and dive resorts. ONE Internet Marketing Co., Ltd. combines the knowledge of web marketing and scuba diving and is therefore your best choice for successful online marketing of your dive center.

We offer the following services:

  • Complete Marketing and Keyword Research
  • Graphic & Logo Design
  • Web Design and Development
  • Search Engine Optimization
  • Search Engine Marketing
  • Social Media Marketing
  • Social Network Marketing
  • Newsletter Marketing
  • Social Bookmarking
  • Content Creation
  • Back Link Building
  • Google AdWords Campaigns/PPC
  • Facebook Pages that Rock!
  • HTML to WordPress Conversion
  • SSL Certification & Dedicated IPs
  • Cheap Web Hosting
  • Perfect Result Tracking

About Search Engine Optimization (SEO)

The most imminent questions must be;
  • Will your potential customers find YOU before they find your COMPETITORS?
  • Are you on the first page of Google when you search for your product and services with the top key phrases?
  • Do you know how many websites link back to your website; more than to your competitors?
  • Is your site really search engine optimized in every possible way?
But not enough with these 4 important questions. If it where that easy, we would soon be out of a job! Once your website is optimized for search engines, you need to do a more things to gain top positions for your website. Therefore there will be a few more questions you must ask yourself here:

Internet Marketing Tips

Basic On-Site SEO Tip:  Two months ago, we helped a real estate client by doing two things:  Adding Real Estate Schema to their property level listings and trained their in-house marketing assistant on basic SEO tactics.  The client is thrilled with the results, a definite increase in leads and traffic over previous years.
If your site is dynamic and ever changing keeping up on your basic on-page SEO can have a big impact, if you have someone in-house who is savvy with time to spare – call Mannix Marketing for a one-on-one training session, this combined with some expert SEO can have a big impact.
Print it Everwhere Internet Marketing Tip:  This is an oldie but a goody. Every time you get something reprinted, make sure that your website address gets listed on it. For example, if you’re a restaurant, print your address on your menus, brochures, business cards, signage, advertising, email signature, door, handouts, hats and t-shirts! Don’t forget receipts – almost everyone walks out with one! If you are a shopping site, make sure your invoices, shipping labels, boxes, envelopes, catalogs, everything has your address. If you have a bricks and mortar location, is your address on your advertising sign? Your door with your store hours?
Check for the Basics Tip:  Does your site contain all the basics? Hours, phone number and address… all pertinent contact information. Is it easy to navigate? Allow secure purchases? For the tourist industry, does it allow secure purchase of gift certificates? Invite comments? (You can learn a lot from a contact us page.) If you are a restaurant, do you have your menus, special events, directions, banquet menus online? Do you visually sell the restaurant? Allow online sign up for email specials? What about take out menus? An email sign up would be perfect for this if it is a big part of your business. Does the site list a dress code? How to make a reservation? And don’t forget added benefits for you: links to other area businesses, employment opportunities, printable employment applications. Good Internet marketing will impress your market audience and provide you with a website that does more than look pretty.
Keyword Research Tip:  The first step to any Internet marketing campaign is the keywords. How will potential customers find you in the search engines? Work with different keyword combinations to determine the keywords you want to be found under. Make sure you balance broader keyword combinations with more specific keyword combinations. The average person searching on the Internet may start with a broad query, but they quickly narrow it down as they see returned results and learn more about what they are searching for. For example, someone searching for digital cameras may start with “Digital Cameras”… after clicking a couple choices, they may then search on “Nikon digital cameras”… after clicking a couple more choices, they may search on Nikon Coolpix cameras, then narrow it even further to Nikon Coolpix 4800 Digital Camera. The more specific they become, the more likely they are to purchase.
My favorite way to find new keywords quickly is the Google Spacebar Keyword Research Tip: type in your keyword in Google then hit the spacebar, more keyword suggestions will come up, hit the spacebar and a letter like
SEO A - gives me suggestions for seo audit, seo analyzer, seo articles etc…  all sorts of ideas for what I might want to be found under.
Competitive Research Tip using Evernote:  A basic component of any marketing strategy is to know your competition. This is especially true in Internet marketing. Do an online search for the keywords you want to be found under. Who is your competition? What is their pricing structure? What keywords do they target? Honestly appraise their site against your own. Is their site better than yours? Why? What do they do better on their site that you may be able to improve upon on your site? Is their site more informative? Is it easier to navigate?Then …. do they have a newsletter you can sign up for?  – you can sign up for an evernote account, and sign up for the enewsletter with that email address, then every one of their enewsletters will be saved in your evernote account – this is great for research.  You can go back years and see what they promote at different times of year (heard this tip from LinkLove).
Write a Blog Tip:  Are you the “expert” in your industry? If so, share your knowledge on your site. Write feature articles for your website. Volunteer to write articles for others with the stipulation that they link back to your website and your business. This is a great way for you to not only improve traffic to your website, but improve brand recognition for your company.  Fresh content and quality content will improve traffic to your site.  Don’t forget to have Mannix Marketing help you set up your Google+ Authorship!
Tip:  Build Loyalty and Top of Mind Awareness through Email Campaings: Your customer base may know who you are, but do they think of you FIRST when they need your type of product? If not… keep your business in the minds of anyone who has been to your site or business through email marketing. Offer a sign-up on your site so they can be the first to find out about your new products. Offer “weekly tips”, or send out monthly coupons. Make sure you only send email to those you’ve requested it through your site. And, make sure the email has a BENEFIT for the customer… not just free publicity for you.
TRACK YOUR WEBSITE STATISTICS AND ANALYZE!!!
Most hosting packages come with stats. Google Analytics is also a great program, we like to set up both server side stats and Google Analytics.  Don’t just look at hits – look at unique visitors, referrers, exit and entry pages, time spent on site, and keyword combinations used to arrive at your site and goals.
Any site that can measure a conversion (a sign up, a purchase, an action) should truly analyze traffic patterns, keywords and pay per click programs with a good tool. Not sure how to track conversions, ask Mannix Marketing, we have lots of options for you!
HANDY RESOURCES FOR THE “DO IT YOURSELFER”

Friday, 21 February 2014

ASP.Net MVC Questions and Answers

1. Explain MVC (Model-View-Controller) in general?

Model-View-Controller (MVC) is an architectural software pattern that basically decouples various components of a web application. By using the MVC pattern, we can develop applications that are more flexible to changes without affecting the other components of our application.
  • "Model",is basically domain data.
  • "View" is the user interface to render the domain data.
  • "Controller" translates user actions into appropriate operations performed on the model.
2. What is ASP.NET MVC?

ASP.NET MVC is a web development framework from Microsoft that is based on the Model-View-Controller (MVC) architectural design pattern. Microsoft has streamlined the development of MVC based applications using the ASP.NET MVC Framework.

3. What are the differences between ASP.NET MVC and ASP.NET WebForms?

ASP.NET Web Forms use the Page Controller Pattern for rendering layout, whereas ASP.NET MVC uses the Front Controller approach. In the case of the Page Controller Pattern, every page has its own Controller, in other words a code-behind file that processes the request. On the other hand, in ASP.NET MVC, a common Controller for all pages processes the requests.

Follow the link for the difference between the ASP.NET MVC and ASP.NET WebForms.

4. What are the Core features of ASP.NET MVC?

The core features of the ASP.NET MVC Framework are:
  • Clear separation of application concerns (Presentation and Business Logic)
  • An extensible and pluggable framework
  • Extensive support for ASP.NET Routing
  • Support for existing ASP.NET features
Follow for detailed understanding of above mentioned core features.

5. Can you please explain the request flow in the ASP.NET MVC framework?

The request flow for the ASP.NET MVC Framework is as follows.

The request hits the Controller coming from the client. The Controller plays its role and decides which model to use to serve the request, further passing that model to the View that then transforms the model and generates an appropriate response that is rendered to the client.

6. What is Routing in ASP.NET MVC?

In the case of a typical ASP.NET application, incoming requests are mapped to physical files such as an .aspx file. The ASP.NET MVC Framework uses friendly URLs that more easily describe the user's action but are not mapped to physical files.

The ASP.NET MVC Framework uses a routing engine that maps URLs to Controller classes. We can define routing rules for the engine, so that it can map incoming request URLs to the appropriate Controller. 

Practically, when a user types a URL in a browser window for an ASP.NET MVC application and presses the "go" button, the routing engine uses routing rules defined in the Global.asax file to parse the URL and determine the path of the corresponding Controller.

7. What is the difference among ViewData, ViewBag and TempData?

To pass data from a Controller to a View and in a subsequent request, The ASP.NET MVC Framework provides various options, in other words ViewData, ViewBag and TempData.

Both ViewBag and ViewData are used to to communicate between Controller and corresponding View. But this communication is only for the server call, it becomes null if the redirect occurs. So, in short, it's a mechanism to maintain state between Controller and corresponding View.

ViewData is a dictionary object while ViewBag is a dynamic property (a new C# 4.0 feature). Since viewData is a dictionary object it is accessible using strings as keys and also requires typecasting for complex types. On the other hand, ViewBag doesn't have typecasting and null checks.

TempData is also a dictionary object that persists for the life of a HTTP Request. So, Tempdata can be used to maintain data between redirects, in other words from one Controller to another Controller.

8. What are Action Methods in ASP.NET MVC?

As previously stated about request flows in the ASP.NET MVC Framework, a request coming from a client hits the Controller first. Actually the MVC application determines the corresponding Controller using routing rules defined in Global.asax. And Controllers have specific methods for each user actions. Each request coming to the Controller is for a specific Action Method. The following code example, "ShowBooks" is an example of an Action Method.

public ViewResult ShowBooks(int id)
{
    var computerBook = db.Books.Where(p => P.BookID == id).First(); 
    return View(computerBook);
}

9. Explain the role of Model in ASP.NET MVC?

One of the core features of ASP.NET MVC is that it separates the input and UI logic from business logic. The role of the Model in ASP.NET MVC is to contain all application logic including validation, business and data access logic except View. In other words input and Controller; in other words UI logic.

The Model is normally responsible for accessing data from some persistent medium such as a database and manipulates it.

10. What are Action Filters in ASP.NET MVC?

If we need to apply some specific logic before or after action methods then we use action filters. We can apply these action filters to a Controller or a specific Controller action. Action filters are basically custom classes that provide a way for adding pre-action or post-action behavior to Controller actions.

For example:
  • An Authorize filter can be used to restrict access to a specific user or a role.
  • An OutputCache filter can cache the output of a Controller action for a specific duration.
Tag: .NET Framework 3.5, ASP.NET MVC, ASP.net MVC 3,ASP.NET MVC Framework Asp.net mvc3asp.net mvc3 Razor Aspx page AuthenticateRequestCab Automation Software crud CRUD operation,Cshtml, Engine with Entity Framework 4.0,HttpHandlers, JQ grid with Jquery in asp.net mvc3, Razor,JSON ,Model View Control, model view controller,MVC 3 ,mvc application, MVC Design pattern, MVC3 routing ,Unity Framework ,View