Posts

Showing posts from April, 2018

Create Schema Using C# Asp .Net Dynamically.

In WebConfig First Set The Connection String. ====================================== <?xml version="1.0"?> <!--   For more information on how to configure your ASP.NET application, please visit   http://go.microsoft.com/fwlink/?LinkId=169433   --> <configuration>   <connectionStrings>     <add name="InterviewConnectionString" connectionString="Data Source=SATYABRATA;Initial Catalog=Interview;Persist Security Info=True;User ID=satya;Password=satya@215;MultipleActiveResultSets=True;Application Name=EntityFramework"           providerName="System.Data.SqlClient" />   </connectionStrings>   <system.web>     <compilation debug="true" targetFramework="4.5" />     <httpRuntime targetFramework="4.5" />   </system.web> </configuration> ====================================== Design Page in Source FIle ====================================== ...

How to set Transaction and Roll Back using Entity Framework in C# Code.

How to set Transaction and Roll Back using Entity Framework in C# Code. In Page Design ======================================== <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestReansaction.aspx.cs" Inherits="WebApplication1.TestReansaction" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>          <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />         <asp:Button ID="button2" runat="server" Text="btn test 2" OnClick="button2_Click" />         </div>           </form> </body> </html> ================================= In C# Code ==================== using Syste...

When User has Registered at that time create a container and blob and 4 Subcontainer using Windows Azure.

First Set the Connection String in Web Config File. the Process Is =============== <!--Azure Storage Account and BlobContainer Connection String (Satya)-->     <add key="StorageAccountName" value="satyastorageaccount" />     <add key="StorageAccountKey" value="fffq7R20Q0Pjomd73xSVt44re44dGXTANbM+Mx3iRFfegxjr1Fp6eqhzX2Uzvw==" />     <add key="blobcontainer" value="linkueblobcontainer" />     <!--End Azure ConnectionString--> =============================================== Next In C# ASP .NET CODE ===============================  protected void Button1_Click(object sender, EventArgs e)         {  // this is Dynamically Sub Container name from frontend  string floder = txtcreatecontanier.Text;             // Retrieve storage account from connection string.              CloudStorageAccount storageAccount = new CloudStorage...

How to post image in blob using Windows Azure.

How to post image in blob using Windows Azure. First Set Connection String in Web Config File ============================  <!--Blob Connnection-->     <add key="StorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=satyastorageaccount;AccountKey=SrVl+wKtyrty64564564646464545vPeFthtrhrt7vQXdxjr1Fp6e67tutut==" />     <!--End BlobConnection--> ================================= using Microsoft.Azure; using Microsoft.WindowsAzure.Storage; using Microsoft.WindowsAzure.Storage.Auth; using Microsoft.WindowsAzure.Storage.Blob; using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; using System.Threading.Tasks; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Telerik.Web.UI; using Telerik.Web.UI.ImageEditor; namespace testassss.Admin {     public partial class CompanyBranding : System.Web.UI.Page     {       ...