Tags » Mvc4

User control in MVC4 for showing Suceess and Error Message

/*paste Code on view where you want to display Message Generally I prefer it on top of the View */

@if (Session["errorMessage"] != null)
{ 196 more words

Jquery

Passing parameter to store procedure using command parameter in MVC4

public DataTable getEdgingReport(DateTime date)
{
DataTable dt;
DataSet ds = new DataSet();
SqlCommand cmd = new SqlCommand(“SpFpcGenerateEdgingReport”, con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue(“@rights_fromdate”, DateTime.Now);
cmd.Parameters.AddWithValue(“@rights_todate”, date); 47 more words

Jquery

Dynamically deciding where clause of the store procedure

ALTER procedure .
(
@ProgramId varchar(10) =null
–Buyer
, @BuyerId varchar(10) = null
–Seller
, @SellerId varchar(10) = null
–FromDate
, @rights_fromdate datetime=null
–ToDate
, @rights_todate datetime=null… 273 more words

Jquery

Mail sending in c#

This post shows how to send mail through c# code. Here we stored all the parameter required for mail send like Subject, From Address, To address, HOST and all other into the web.config file. 229 more words

Jquery

Jquery UI Popup in MVC4 application

/follwing div will be opened into POPUP window same as above Add following Script file jquery-ui and css files for the same/

@Html.TextBox(“RightName”, null, new { id=”rightName”}) 25 more words

Jquery

Delete Listbox selected Items using Jquery

/*On button click delete ListBox selected Item here @btnDeleteIncluded is delete button Id and #IncludedList is listbox Id */
$(“#btnDeleteIncluded”).click(function () {
$(“#IncludedList”).find(‘option:selected’).remove();
});

Jquery

Disable Submit button until form gets submit

Following code disables the Submit button until form gets submit successfully. This is necessary because user may click more than once on submit button and the same data may be processed more than once. 69 more words

Jquery