Translate

Thursday, 3 December 2015

MVC equerry mail

http://www.mikesdotnetting.com/article/268/how-to-send-email-in-asp-net-mvc

Angular JS

http://www.codeproject.com/Articles/869433/AngularJS-MVC-Repository-Dispose

Thursday, 26 November 2015

c# add stylesheet with .less file in your website

Install 

Tools –> Library Package Manager –> Package Manager Console
PM> Install-Package dotLess



<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>@ViewBag.Title - My ASP.NET MVC Application</title>
        <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        <meta name="viewport" content="width=device-width" />
        @Styles.Render("~/Content/less")
        @Scripts.Render("~/bundles/modernizr")
    </head>


And add your bundle to the appropriate location within BundleConfig.cs

public class BundleConfig
{
    public static void RegisterBundles(BundleCollection bundles)
    {
        // NOTE: existing bundles are here 

        // add this line
      bundles.Add(new LessBundle("~/Content/less").Include("~/Content/*.less"));
    }
}


dotLess will apply transforms to your web.config when you install it 
through NuGet to provide handlers which can process a specific LESS 
file:
---------------------

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="dotless" type="dotless.Core.configuration.DotlessConfigurationSectionHandler, dotless.Core" />
  </configSections>
  <!-- these probably do something useful -->
  <dotless minifyCss="false" cache="true" web="false" />
  <system.webServer>
    <handlers>
      <!-- for IIS7+ -->
      <add name="dotless" path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler,dotless.Core" resourceType="File" preCondition="" />
    </handlers>
  </system.webServer>
  <system.web>
    <httpHandlers>
      <!-- for IIS6 -->
      <add path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler, dotless.Core" />
    </httpHandlers>
  </system.web>
</configuration>



-----------------------
Or Follow this Link
http://www.brendanforster.com/blog/yet-another-implement-less-in-aspnetmvc-post.html

Monday, 2 November 2015

Saturday, 26 September 2015

For Details on Layer and Tire

https://msdn.microsoft.com/en-gb/library/ee658109.aspx

http://stackoverflow.com/questions/120438/whats-the-difference-between-layers-and-tiers

Friday, 18 September 2015

Get USD to INR exchange rate dynamically in C# by Pabitra

using System.IO;
using System.Net;
using System.Xml;
----------------------

 private void button2_Click(object sender, EventArgs e)
        {
            WebRequest webrequest = WebRequest.Create("http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency=USD&ToCurrency=INR");
            HttpWebResponse response = (HttpWebResponse)webrequest.GetResponse();
            Stream dataStream = response.GetResponseStream();
            StreamReader reader = new StreamReader(dataStream);
            string responseFromServer = reader.ReadToEnd();
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(responseFromServer);
            string value = doc.InnerText;

            MessageBox.Show(value);
            reader.Close();
            dataStream.Close();
            response.Close();


        }

Saturday, 12 September 2015

Date Time Picker in Jquery

  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#<%=txtFromdate.ClientID%>').datepicker({ dateFormat: "dd/mm/yy" }).val()
            $('#<%=txtTodate.ClientID%>').datepicker({ dateFormat: "dd/mm/yy" }).val()
        });
      
   </script>


<div>

<asp:TextBox ID="txtFromdate" Width="35%" runat="server" placeholder="Select Date" ToolTip="From Date" AutoCompleteType="Disabled" TabIndex="1"></asp:TextBox>

<br/>
<asp:TextBox ID="txtTodate" Width="35%" runat="server" placeholder="Select Date" ToolTip="From Date" AutoCompleteType="Disabled" TabIndex="1"></asp:TextBox>



</div>