Skip to main content

Posts

Showing posts from January, 2017

How to Generate Excel from JSON Data Using Asp.net(C#).

Here I will explain how to generate excel from json. I am using NPOI and Newtonsoft.Json third party dll for this. Download dll from here :  https://drive.google.com/file/d/0B2UW8NPznIKsdzJSWDBDX2xLSms/view JSON For Test : [   {     "ID" : "1",     "NAME" : "Nikhil Sangani",     "MOBILENO" : "123456789",     "DESIGNATION" : "Web Developer"  } ] First of all i am create aspx page design like this. <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>         <table>             <tr>                 <td>                     JSON STRING :<asp:TextBox runat="server" ID="txtjsonstring"></asp:TextBox>                 </td>             </tr>             <tr>

How to save or retrive value from Web.config file in Asp.net(c#).

Here I will explain how to store or retrive value from Web.config file. Web.config <pre class="brush:html;first-line:10"> <configuration>  <appSettings>       <add key="Value" value="" />  </appSettings> </configuration> </pre> Save Value in Web.Config <pre class="brush:html;first-line:10"> Configuration configuration = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~"); configuration.AppSettings.Settings["Value"].Value = "Nikhil Sangani"; configuration.Save(); </pre> Retrive Value from Web.Config <pre class="brush:html;first-line:10"> string value = ConfigurationSettings.AppSettings["Value"].ToString(); </pre>