Wednesday 31 May 2017

How do I access ViewBag from JS
Description:
In this example we explain that how to Access ViewBag from JavaScript or how do I access ViewBag data form JavaScript (JS).or is it possible to access MVC ViewBag object from JavaScript file.
how to access @Viewbag data to JavaScript function at client side or how to access ViewBag at client side in MVC.pass viewbag data to external JavaScript file or access viewbag in JavaScript code there are lots of questions are raised in our mind.
So below is the code that demonstrates how to use ViewBag in JS.
Code:
<script>var myJsVariable = '@ViewBag.MyVariable' </script>
2)      var cc = @Html.Raw(Json.Encode(ViewBag.CC)
3)      <script type="text/javascript">
      $(document).ready(function() {
                showWarning('@ViewBag.Message');
      });
 
</script>
4)      var myValue = document.getElementById("@(ViewBag.CC)").value;
5)      var x = $('#' + '@(ViewBag.CC)').val();
 
 
 
 


How do I access ViewBag from JavaScript.

How do I access ViewBag from JS
Description:
In this example we explain that how to Access ViewBag from JavaScript or how do I access ViewBag data form JavaScript (JS).or is it possible to access MVC ViewBag object from JavaScript file.
how to access @Viewbag data to JavaScript function at client side or how to access ViewBag at client side in MVC.pass viewbag data to external JavaScript file or access viewbag in JavaScript code there are lots of questions are raised in our mind.
So below is the code that demonstrates how to use ViewBag in JS.
Code:
<script>var myJsVariable = '@ViewBag.MyVariable' </script>
2)      var cc = @Html.Raw(Json.Encode(ViewBag.CC)
3)      <script type="text/javascript">
      $(document).ready(function() {
                showWarning('@ViewBag.Message');
      });
 
</script>
4)      var myValue = document.getElementById("@(ViewBag.CC)").value;
5)      var x = $('#' + '@(ViewBag.CC)').val();
 
 
 
 


Tuesday 30 May 2017

Sql server update multiple columns from another table
Description:
In this example we explain that how to update multiple columns from another table in SQL Server or SQL Query to update multiple column form one table to another table in SQL Server.SQL Query to update from one table to another Table based on ID match or join.

Here we demonstrate that how to update table from another table and different database or how to update multiple column from another table with different database. or update field with data from another database.

SQL Query to update multiple column from another table

Sql server update multiple columns from another table
Description:
In this example we explain that how to update multiple columns from another table in SQL Server or SQL Query to update multiple column form one table to another table in SQL Server.SQL Query to update from one table to another Table based on ID match or join.

Here we demonstrate that how to update table from another table and different database or how to update multiple column from another table with different database. or update field with data from another database.

This entry was posted in :

Monday 29 May 2017

Only return rows that have an empty field?
Description:

In this example we explain that how to return only rows that have an empty field in SQL Server. Or SQL Query to return only rows that have an empty fields. Or sql query to return all the rows that have null or empty fields. There are many question raised as per different user like getting all Records where particular fields is non empty or select all record with NO NULL value in table or getting all records where particular column is empty in SQL Server.

Return only Rows that have an empty field in SQL Server.

Only return rows that have an empty field?
Description:

In this example we explain that how to return only rows that have an empty field in SQL Server. Or SQL Query to return only rows that have an empty fields. Or sql query to return all the rows that have null or empty fields. There are many question raised as per different user like getting all Records where particular fields is non empty or select all record with NO NULL value in table or getting all records where particular column is empty in SQL Server.

This entry was posted in :

Thursday 18 May 2017

How to call the javascript function in mvc Action Result
Description:
In this example we explain that how to call the JavaScript function in MVC Action Result method.or how to call JavaScript method from controller in MVC. or how to call JavaScript function in MVC 4 controller.there are many question are raised in our mind to call the JavaScript function from back-end in MVC or call JavaScript function from controller’s ActionReasult method.

call javascript function from Controller in MVC 4

How to call the javascript function in mvc Action Result
Description:
In this example we explain that how to call the JavaScript function in MVC Action Result method.or how to call JavaScript method from controller in MVC. or how to call JavaScript function in MVC 4 controller.there are many question are raised in our mind to call the JavaScript function from back-end in MVC or call JavaScript function from controller’s ActionReasult method.

Tuesday 16 May 2017

Return XML file from Controller's Action method to View in ASP.Net MVC

Description:
In this example wee explain that how to returning the XML file from Controller to View in asp.Net MVC.or how to return XML file from Controller’s Action Methods to View in MVC Razor.


Suppose you have one Employee XML file and then you want to display this file in Razor View then you can easily read or return the XML file from Action Method of Controller to View in Razor MVC.

Main point is that to return the XML file ContentResult return type is used for returning the xml file from controller to View in asp.net MVC.

Return XML file from Controller's Action method to View in MVC

Return XML file from Controller's Action method to View in ASP.Net MVC

Description:
In this example wee explain that how to returning the XML file from Controller to View in asp.Net MVC.or how to return XML file from Controller’s Action Methods to View in MVC Razor.


Suppose you have one Employee XML file and then you want to display this file in Razor View then you can easily read or return the XML file from Action Method of Controller to View in Razor MVC.

Main point is that to return the XML file ContentResult return type is used for returning the xml file from controller to View in asp.net MVC.
This entry was posted in :

Monday 15 May 2017

Pass (Send) DataSet (DataTable) from Controller to View in ASP.Net MVC

Description:
In this example we explain that how to pass DataTable from Controller to View in MVC in asp.net MVC,or how to pass or send DataTable from controller to View in MVC. Suppose you have List of the Employee List and you want to display it in gridview so this type of scenario that example is used to pass or send Employee DataTable or DataSet from controller to View in MVC.

Here we demonstrate that how to pass or send DataSet or DataTable from controller to View in Asp.Net MVC Razor.

Pass (Send) DataSet (DataTable) from Controller to View in ASP.Net MVC

Pass (Send) DataSet (DataTable) from Controller to View in ASP.Net MVC

Description:
In this example we explain that how to pass DataTable from Controller to View in MVC in asp.net MVC,or how to pass or send DataTable from controller to View in MVC. Suppose you have List of the Employee List and you want to display it in gridview so this type of scenario that example is used to pass or send Employee DataTable or DataSet from controller to View in MVC.

Here we demonstrate that how to pass or send DataSet or DataTable from controller to View in Asp.Net MVC Razor.
This entry was posted in :

Thursday 11 May 2017

chart control in mvc

Description:
In this example we explain that how to use chart control in asp.net MVC or how to display chart in MVC or drawing chart into asp.net MVC or displaying data in chart with Asp.Net Razor in MVC. how to display or bind chart in razor view in asp.net MVC. There are many question are raised for binding chart in mvc.so how to use chart control to create or display chart in asp.net MVC razor view.

Here we create chart or bind chart data from database using charts helper class in asp.net MVC Razor. so how to use charts helper class in asp.net razor to display or bind chart in MVC.

Here we demonstrate how to bind charts from the database using charts helper class in asp.net MVC.

Using Chart control in ASP.Net MVC Razor

chart control in mvc

Description:
In this example we explain that how to use chart control in asp.net MVC or how to display chart in MVC or drawing chart into asp.net MVC or displaying data in chart with Asp.Net Razor in MVC. how to display or bind chart in razor view in asp.net MVC. There are many question are raised for binding chart in mvc.so how to use chart control to create or display chart in asp.net MVC razor view.

Here we create chart or bind chart data from database using charts helper class in asp.net MVC Razor. so how to use charts helper class in asp.net razor to display or bind chart in MVC.

Here we demonstrate how to bind charts from the database using charts helper class in asp.net MVC.
This entry was posted in :

Wednesday 10 May 2017

Call Controller Action method from View using JavaScript in ASP.Net MVC
Description:
In this example we explain that how to call controller Action Method from view using JavaScript in asp.net MVC.so here how to call controller’s Action method at client side using JavaScript how to call controller Action method from the Razor View using JavaScript in asp.net MVC.

Simply controller action method will be called from the view with the use of the Ajax.BeginForm extension method which allow to call controller action method using JavaScript in MVC razor.

Below is the code that demonstrate how call Controller’s action method using JavaScript in MVC.

Call Controller Action method from View using JavaScript in ASP.Net MVC

Call Controller Action method from View using JavaScript in ASP.Net MVC
Description:
In this example we explain that how to call controller Action Method from view using JavaScript in asp.net MVC.so here how to call controller’s Action method at client side using JavaScript how to call controller Action method from the Razor View using JavaScript in asp.net MVC.

Simply controller action method will be called from the view with the use of the Ajax.BeginForm extension method which allow to call controller action method using JavaScript in MVC razor.

Below is the code that demonstrate how call Controller’s action method using JavaScript in MVC.

Tuesday 9 May 2017

Upload, Read and Display CSV file (Text File) data in ASP.Net MVC
Description:
In this example we explain that how to Upload, Read and display or bind CSV File data in asp.net MVC.or how to read data from CSV file and bind data in MVC.Here we upload file then read it and display it on grid in mvc razor.CSV file is stored the data in comma separated values.

So here we demonstrate how to upload CSV file in MVC and then Read CSV file data and bind it in MVC Grid or html table.

Upload, Read and Display CSV file data in MVC

Upload, Read and Display CSV file (Text File) data in ASP.Net MVC
Description:
In this example we explain that how to Upload, Read and display or bind CSV File data in asp.net MVC.or how to read data from CSV file and bind data in MVC.Here we upload file then read it and display it on grid in mvc razor.CSV file is stored the data in comma separated values.

So here we demonstrate how to upload CSV file in MVC and then Read CSV file data and bind it in MVC Grid or html table.
This entry was posted in :

Monday 8 May 2017

Multiple File Uplaod
Description:
In this example we explain that how to upload file using jQuery Ajax call in asp.net MVC.or how to upload files using jQuery Ajax in asp.net MVC Razor.here we use the Jquery Uploadify plugin to upload the multiple files at a time using jQuery and Ajax in asp.net MVC.

In controller we use the HttpPostedFileBase collection as a parameter and get all files in loop and save to the directory or folder.

Upload multiple files using jQuery AJAX in ASP.Net MVC

Multiple File Uplaod
Description:
In this example we explain that how to upload file using jQuery Ajax call in asp.net MVC.or how to upload files using jQuery Ajax in asp.net MVC Razor.here we use the Jquery Uploadify plugin to upload the multiple files at a time using jQuery and Ajax in asp.net MVC.

In controller we use the HttpPostedFileBase collection as a parameter and get all files in loop and save to the directory or folder.

Sunday 7 May 2017

 remove last character from string in C#
Description:
In this example we explain that how to remove last character from string in C# in asp.net or remove last character from string variable value in C#.in C# there is lots of the function is available so we can easily remove last character from string by using “Remove” or “Trim” or “IndexOf” properties.

Here we explain that all the methods of the how to remove last character from the string in C#.

Remove Last Character from String in C#.

 remove last character from string in C#
Description:
In this example we explain that how to remove last character from string in C# in asp.net or remove last character from string variable value in C#.in C# there is lots of the function is available so we can easily remove last character from string by using “Remove” or “Trim” or “IndexOf” properties.

Here we explain that all the methods of the how to remove last character from the string in C#.

Saturday 6 May 2017


How to Get Read Only TextBox values in asp.net using C#
Description:
In this example we explain that how to get read only textbox values in asp.net using C#.or how to get read only textbox values or disabled textbox value in codebehind using asp.net.

Get value of ReadOnly TextBox in asp.net and retain its value across postback.because after postback the readonly textbox value is not get the last updated value.so to get last updated value below is the code to get read only textbox value in C#.

by simply adding one line of code to get the value of readonly and disabled textbox in asp.net.

TextBoxId.Attributes.Add("readonly", "readonly"); 

How to Get Read Only TextBox values in asp.net using C#


How to Get Read Only TextBox values in asp.net using C#
Description:
In this example we explain that how to get read only textbox values in asp.net using C#.or how to get read only textbox values or disabled textbox value in codebehind using asp.net.

Get value of ReadOnly TextBox in asp.net and retain its value across postback.because after postback the readonly textbox value is not get the last updated value.so to get last updated value below is the code to get read only textbox value in C#.

by simply adding one line of code to get the value of readonly and disabled textbox in asp.net.

TextBoxId.Attributes.Add("readonly", "readonly"); 

Thursday 4 May 2017

Get IP Address
Description:
In this example we explain that how to get client IP Address of Visitor machine in asp.net MVC.or how can I get Client IP Address of visitor machine in mvc.or how to get IP Address of the user in asp.net mvc.

Here we explain that how to get IP Address of visitors machine which don’t use proxy servers. Here we use HTTP_X_FORWARDED_FOR to check the machine use any proxy server or not and second we use REMOTE_ADDR to get the client machine IP Address.

Below is the example that demonstrates how to get or fetch client machine IP Address using asp.net MVC.

How to get Client IP Address of Visitors Machine in MVC

Get IP Address
Description:
In this example we explain that how to get client IP Address of Visitor machine in asp.net MVC.or how can I get Client IP Address of visitor machine in mvc.or how to get IP Address of the user in asp.net mvc.

Here we explain that how to get IP Address of visitors machine which don’t use proxy servers. Here we use HTTP_X_FORWARDED_FOR to check the machine use any proxy server or not and second we use REMOTE_ADDR to get the client machine IP Address.

Below is the example that demonstrates how to get or fetch client machine IP Address using asp.net MVC.

This entry was posted in :

Wednesday 3 May 2017


Get Selected Text and Value of CheckBoxList using jQuery in ASP.Net
Description:

In this example we explain that how to get or set the text and value of the checkboxlist in asp.net using jQuery.or get selected Text and value of CheckBoxList using jQuery in asp.net.how to get selected text and value of checkboxlist control using jQuery in asp.net.

Get Selected Text and Value of CheckBoxList using jQuery in ASP.Net


Get Selected Text and Value of CheckBoxList using jQuery in ASP.Net
Description:

In this example we explain that how to get or set the text and value of the checkboxlist in asp.net using jQuery.or get selected Text and value of CheckBoxList using jQuery in asp.net.how to get selected text and value of checkboxlist control using jQuery in asp.net.

Monday 1 May 2017

How to retrieve checkboxes values in jQuery
Description:
In this example we explain that how to get selected checkboxes value using jQuery and javascript in asp.net or how to fetch the selected or checked checkboxes values using jQuery and javascript.or how to retrieve the value of the selected or checked checkbox using jQuery.here we demonstrate that how to use jQuery to get the values of selected checkboxes in asp.net.

Get Selected Value of CheckBoxes using jQuery

How to retrieve checkboxes values in jQuery
Description:
In this example we explain that how to get selected checkboxes value using jQuery and javascript in asp.net or how to fetch the selected or checked checkboxes values using jQuery and javascript.or how to retrieve the value of the selected or checked checkbox using jQuery.here we demonstrate that how to use jQuery to get the values of selected checkboxes in asp.net.
This entry was posted in :