Posts

How to pass model in a ajax call to a method ??

Form MVC 3 or MVC 2 the objs passed in the form of json are automatically converted model format if the model of that type of object exists. Example Let say we have a model 'Customer' Public class Customer { public int CustomerID {get; set;} public string CustomerName {get; set;} public string CustomerAddress {get; set;} } Here we have a model 'Customer' with 3 attributes ID, Name, Address. Now we need to have a Get method and a post method public ActionResult Index() { return View(""); } [HttpPost] public ActionResult Index( Customer modelCustomer) { // Do your stuff here return View ("") } Here i have two different Function in the above code one is the httpGet method this is used to call the view where as the other is used to call the post method form the view may be using Submit or using ajax calls. here goes the code for ajax call @model iEnumerable @using (Html.BeginForm("Index", "Home" , FormMethod.Post , ...

Passing multiple models in single view .

There are two different ways of doing this . * Passing parent view that contains both the models which we want to pass in the view . * passing each model in a ViewBag we have two different models public class Customer { public int CustomerID {get; set;} public string CustomerName {get; set;} } public class Product { public int ProductId {get; set ;} public string ProductName{get; set ;} } 1. By passing a parent view Here we want to pass both the models in a single view , by default the razor engine only accepts single model per view. so we need to create a parent view that hold both the models. public class ParentView { public Customer customer{get; set;} public Product product{get ; set;} } then we can call the model in the view by using the following code in view page : @model iEmumerable <models.ParentView> ForEach(var v in ParentView) { < option > @v.customer.CustomerID < / option > < option > @v.customer.CustomerName <...

A Briefing to MVC

Image
MVC  Its is a framework for better web application development . Before this used the Web Forms for the purpose of web application creation. Web application creates has a long runny heavy process in which the controller is connected and maintained by server. The details of every small control is connected and shared with server at every point. Thus MVC was introduced to get the a light weight web application. its uses the HTML controls to make the page . In web forms the controls are converted to the Html tags at run time but in MVC the the Html is created at the design time thus making it faster than any other web forms based application .  MVC has some positive points over the Web Forms   It provides better structure to web applications As controller created in MVC are class of  .Net thus its is easy to create unit cases and the automatic manual test cases. it can provide a better layored architecture to the user to work parallel on same application...

Issue happened with MOSS 2007

Problem We have SharePoint server 2007 connected to the production environment with the SQL Data base name WSS_Content_P. Due to some technical changes we by mistake triggered the Production Front end to the Test environment Database that is WSS_Content_T . Here the Test database was just the replica of the production database with difference of 2 days. Now after some days we got to know that such a problem has been created. We found that business data of 2 days was missing from the database. Solution : In the End we came to solution to any how sync the two databases. Now we needed the best database comparison tool to check the data from the two database server. Tool Used :  VISUAL STUDIO Internal Tool : SQL > DATA COMPARE ·          Click the Data compare option in visual studio. ·          Provide the connection to both the databases, one will be source and other will be the destination. · ...

Working on Web application? Remember these Points for the UI prespective !!

We use multiple languages to create a web application but the browser is only able to understand HTML ,JS ,CSS etc.  Remember some points to create a better web application . 1. Mobile First Application - In  today's mobile world most of the people use mobile devices to access different websites. You first need to know your customer if you wish to go mobile try to keep in mind the concept of mobile first . Use responsive templates or themes to create applications. Generally before this developer use to check which device is accessing the website based on which they for the . Many of you have generally seen that when access many of the websites they shows m.website this ' m ' shows that the programmer has checked for the device and then routed you to different pages that is specific for mobile device. But in many cases i have seen the developers forget to check for the opposite . so the better idea is to use a responsive template which automatically changes the...

What is Monitoring in SharePoint 2103? What are the other option in SharePoint 2013?

Image
Health Analyzer Review problems and solutions  Here we can check for the problem in the SharePoint server. These problems may include the details of low memory, high memory usage .There are many different ways by which these problems can be resolved. Review rule definitions  Here we can see different rules that are used to manage the rule definition. Timer Jobs   Review job definitions  Here we can review job definition i.e. hoe different jobs are scheduled with details of on which web application which timer job is running .these job can be clean up of logs list, trimming of log details, deletion of dead sites in web application.   Check job status    It is divided into three section scheduled, running and history .It shows when and how different services are executed on the server.   Reporting View administrative reports  Default document library of SharePoint used for managing the administrative reports. These reports may include da...

What is system setting in sharePoint2013? Other options in system setting in SharePoint2013?

Image
Servers Manage servers in this Farm : As we can have multiple server in single farm this option is to add up servers or remove server linked to the farm . Manage services on Server: Different server has been given different services to work upon . This option help us to make the efficient use of the server by ,managing the services required to the specific server . E-Mail and text Messaging (SMS) Configure outgoing e-mail settings : setting outgoing Emails for the SharePoint server. Configure incoming e-mail settings :setting Incoming Emails for the SharePoint server. Configure mobile account : This is used to set-up mobile accounts for getting notification alerts as short messages service  on mobile device . Farm Management Configure alternate access mappings : mapping of web application to the protocols of internal and public URLs. Manage farm features : enabling or disabling different features on the farm . such as search , BCS , visco services  etc. Manage Fa...