Wednesday, 25 April 2012

image show in div tag from database , fast way to show image in asp.net web page with sql serever database code

image show in div tag from database , fast way to show image in asp.net web page with sql serever database code..................
<div id="members1" runat="server" class="celebs">
                </div>
////------------
    private void getDataMembers()
    {
        string textDisplay = "";
        myConn = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]);
        SqlCommand cmd = new SqlCommand("select top(3)* from Successful_order by newid()", myConn);
        myConn.Open();
        SqlDataReader dr = cmd.ExecuteReader();
        if (dr.HasRows)
        {
            int i = 1; string profile = "";
            textDisplay = "<ul>";
            while (dr.Read())
            {
                if (i > 3) break;
                if (isPremiumMember(dr["userid"].ToString()) == "Premium")
                {
                    profile = "PremiumMembers.aspx?u=" + dr["userid"] + "&c=" + dr["catid"];
                }
                else
                {
                    profile = "profiledetails.aspx?uid=" + dr["userid"] + "&cid=" + dr["catid"];
                }
                textDisplay += "<li><a href='" + profile + "' target='_blank'><img alt='" + dr["name"] + " at Bollywoodhunts.com" + "' src='" + getUserImage(dr["userid"].ToString(), Convert.ToInt32(dr["catid"])) + "' width='128' height='95' //>" + ((dr["Name"].ToString().Length >= 16) ? Utilities.ToPascalCase(dr["Name"].ToString().Substring(0, 16)) + "..." : Utilities.ToPascalCase(dr["Name"].ToString())) + "</a></li>";
               
                i++;
            }
            textDisplay += "</ul>";
        }
        myConn.Close();
        myConn.Dispose();
        members1.InnerHtml = textDisplay;
    }

Tuesday, 24 April 2012

image print out code with javascript

 <script language="javascript" type="text/javascript">
        function PrintImage() {
            printWindow = window.open("", "mywindow", "location=1,status=1,scrollbars=1,width=600,height=600");
            printWindow.document.write("<div style='width:100%;'>");
            printWindow.document.write("<img id='img' src='" + document.getElementById('calendarImage').src + "'/>");
            printWindow.document.write("</div>");
            printWindow.document.close();
            printWindow.print();
        }

///////---------------

<input type="image" src="images/print.png" alt="Print this page" onclick="PrintImage()" />

image save on server more then one , multiple image save on server


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ImageGallery.aspx.cs" Inherits="ImageGallery"
    EnableEventValidation="false" MasterPageFile="User.master" Title="Your Album And Images" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table width="600px">
        <tr>
            <td colspan="1">
                <asp:Panel ID="Panel2" runat="server">
                    <table width="100%" cellpadding="5" class="mainText">
                        <tr>
                            <td align="left">
                                <span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;
                                    font-weight: 900; color: #993300;">Upload Image</span> (<strong>Suggestion:</strong>
                                For fast Upload each Image file should be less than 1 MB)
                            </td>
                        </tr>
                        <tr>
                            <td width="19%">
                                <div id="FileUploadContainer">
                                    <table>
                                        <tr>
                                            <td>
                                                <asp:ScriptManager ID="Scriptmanager1" runat="server">
                                                </asp:ScriptManager>
                                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                                    <ContentTemplate>
                                                        Select File and click on finish.
                                                        <CuteWebUI:UploadAttachments InsertText="Select Images" runat="server" ID="Attachments1" FileTooLargeMsg="Image is large in size. please try smaller."
                                                            MultipleFilesUpload="true">
                                                        </CuteWebUI:UploadAttachments>
                                                       
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                                <span>(Maximum file size: 10M, Allowed file types: jpeg, jpg, gif, bmp) </span>
                                                <br />
                                                <asp:Button ID="uploadButton" runat="server" Text="Finish" OnClick="uploadButton_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <br />
                            </td>
                        </tr>
                    </table>
                    <asp:Label ID="Label2" runat="server" Font-Bold="True" ForeColor="Red" Font-Names="Verdana"
                        Font-Size="11px"></asp:Label>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td colspan="1">
                <asp:Label ID="Label1" runat="server" Font-Names="Verdana" Font-Size="11px"></asp:Label>
            </td>
        </tr>
        <tr>
            <td valign="top">
                <div id="showImg" runat="server" visible="false">
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
//---------------------code


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.IO;
using System.Data.SqlClient;
using System.Drawing.Imaging;
using System.Collections.Generic;
using System.Net;
using System.Net.Mail;
using System.Net.Cache;
using System.Net.Mime;
using System.Net.NetworkInformation;
using CuteWebUI;


public partial class ImageGallery : System.Web.UI.Page
{
    #region variables
    static int catid = 0;
    static int uniqueid = 0;
    static int c = 0;
    static int mem = 0;
    static string filepath = "";
    int w = 0, h = 0, w1 = 0, h1 = 0;
    string filename;
    static int count = 0;
    int len12;
    int j = 1, k = 1;
    int fc = 0;
    string[] names;
    string[] files;
    #endregion

    #region event functions
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["uniqueid"] != null)
        {
            uniqueid = int.Parse(Session["uniqueid"].ToString());
            catid = int.Parse(Session["catid"].ToString());
            mem = getMember();
            if (mem == 0)
            {
                c = countf();
                showimage();
            }
            else
            {
                c = countf();
                showimage();
            }
        }
        else
        {
            Response.Redirect("Default.aspx");
        }
    }
    protected void uploadButton_Click(object sender, EventArgs e)
    {
        try
        {
            foreach (AttachmentItem item in Attachments1.Items)
            {
                string dir = Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Temp\\image";
                DirectoryInfo di = new DirectoryInfo(dir);
                FileInfo[] arr = di.GetFiles("*.jpg");
                if (arr.Length >= 20 && mem == 0)
                {
                    Response.Write("<script>alert('Membership limit reached!!!Please update your membership.')</script>");
                    Label2.Text = "To upload your more image please update your membership";
                }
                else if (arr.Length >= 50 && mem == 1)
                {
                    Response.Write("<script>alert('Membership limit reached!!!Please update your membership.')</script>");
                    Label2.Text = "To upload your more image please update your membership";
                }
                else if (arr.Length >= 50 && mem == 2)
                {
                    Response.Write("<script>alert('Membership limit reached!!!Please update your membership.')</script>");
                    Label2.Text = "To upload your more image please update your membership";
                }
                else if (arr.Length >= 50 && mem == 3)
                {
                    Response.Write("<script>alert('Membership limit reached!!!Please update your membership.')</script>");
                    Label2.Text = "To upload your more image please update your membership";
                }
                else if (arr.Length >= 50 && mem == 4)
                {
                    Response.Write("<script>alert('Membership limit reached!!!Please update your membership.')</script>");
                    Label2.Text = "To upload your more image please update your membership";
                }
                else
                {
                    item.CopyTo(Server.MapPath("user_folder") + "/" + uniqueid + "/" + catid + "/Temp/image/" + "\\" + item.FileGuid.ToString() + ".jpg");
                    Small(item.FileGuid.ToString() + ".jpg");
                    Big(item.FileGuid.ToString() + ".jpg");
                }
            }
            Attachments1.DeleteAllAttachments();
            //string dir = Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Temp\\image";
            //DirectoryInfo di = new DirectoryInfo(dir);
            //FileInfo[] arr = di.GetFiles("*.jpg");
            //if (arr.Length >= 20 && mem == 0)
            //{
            //    Response.Write("<script>alert('Membership limit reached!!!Please update your membership.')</script>");
            //    Label2.Text = "To upload your more image please update your membership";
            //}
            //else if (arr.Length >= 50 && mem == 1)
            //{
            //    Response.Write("<script>alert('Membership limit reached!!!Please update your membership.')</script>");
            //    Label2.Text = "To upload your more image please update your membership";
            //}
            //else if (arr.Length >= 50 && mem == 2)
            //{
            //    Response.Write("<script>alert('Membership limit reached!!!Please update your membership.')</script>");
            //    Label2.Text = "To upload your more image please update your membership";
            //}
            //else if (arr.Length >= 50 && mem == 3)
            //{
            //    Response.Write("<script>alert('Membership limit reached!!!Please update your membership.')</script>");
            //    Label2.Text = "To upload your more image please update your membership";
            //}
            //else if (arr.Length >= 50 && mem == 4)
            //{
            //    Response.Write("<script>alert('Membership limit reached!!!Please update your membership.')</script>");
            //    Label2.Text = "To upload your more image please update your membership";
            //}
            //else
            //{
            //    uploadImage.SaveAs(Server.MapPath("user_folder") + "/" + uniqueid + "/" + catid + "/Temp/image/" + "\\" + uploadImage.FileName + "");
            //    Small(uploadImage.FileName);
            //    Big(uploadImage.FileName);
            //}

            //deletefiles();
            //Response.Redirect("ImageGallery.aspx");
        }
        catch
        {
            Label2.Text = "Error Occured!!! Please try again later.";
            Response.Write("<script>alert('Error Occured!!! Please try again later.')</script>");
        }

    }
    #endregion

    #region UserDefined Function
    private void Small(string filename)
    {
        j = k = 1;
        string dc = Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Small\\";
        DirectoryInfo inc = new DirectoryInfo(dc);
        FileInfo[] filesc = inc.GetFiles("*.jpg");
        if (filesc.Length > 20 && mem == 0)
        {
            Label2.Text = "To upload your more image please update your membership";
        }
        else if (filesc.Length > 50 && mem == 1)
        {
            Label2.Text = "To upload your more image please update your membership";
        }
        else if (filesc.Length > 50 && mem == 2)
        {
            Label2.Text = "To upload your more image please update your membership";
        }
        else if (filesc.Length > 50 && mem == 3)
        {
            Label2.Text = "To upload your more image please update your membership";
        }
        else if (filesc.Length > 50 && mem == 4)
        {
            Label2.Text = "To upload your more image please update your membership";
        }
        else
        {
            System.Drawing.Image img9 =
            System.Drawing.Image.FromFile(Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Temp\\image\\" + filename);
            if (img9.Width >= 92)
            {
                w1 = 92;
                if (img9.Height >= 92)
                {
                    h1 = 92;
                }
                else
                    h1 = img9.Height;
            }
            else if (img9.Height >= 92)
            {

                h1 = 92;

                if (img9.Width >= 92)
                {
                    w1 = 92;
                }
                else
                    w1 = img9.Width;
            }
            else
            {
                w1 = img9.Width;
                h1 = img9.Height;
            }
            System.Drawing.Graphics g1;
            System.Drawing.Bitmap newImg1 = new System.Drawing.Bitmap(w1, h1);

            g1 = System.Drawing.Graphics.FromImage(newImg1);

            g1.DrawImage(img9, 0, 0, w1, h1);
            string dir12 = Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Small\\";
            while (File.Exists(dir12 + j.ToString() + ".jpg"))
            {
                j++;
            }
            ImageCodecInfo myImageCodecInfo;
            Encoder myEncoder;
            EncoderParameter myEncoderParameter;
            EncoderParameters myEncoderParameters;
            myImageCodecInfo = GetEncoderInfo("image/jpeg");
            myEncoder = Encoder.Quality;
            myEncoderParameters = new EncoderParameters(1);
            myEncoderParameter = new EncoderParameter(myEncoder, 60L);
            myEncoderParameters.Param[0] = myEncoderParameter;
            newImg1.Save(Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Small\\" + j + ".jpg", myImageCodecInfo, myEncoderParameters);
            DatabaseHelper das = new DatabaseHelper();
            SqlDataReader dr1 = das.ExecuteReader("Select user_id,categoryId from profile_details where user_id=" + uniqueid);
            while (dr1.Read())
            {
                if (dr1["categoryId"].ToString() != catid.ToString())
                {
                    string dir123 = Server.MapPath("user_folder") + "\\" + dr1["user_id"].ToString() + "\\" + dr1["categoryId"].ToString() + "\\Small\\";
                    DirectoryInfo inf1 = new DirectoryInfo(dir123);
                    FileInfo[] files123 = inf1.GetFiles("*.jpg");
                    int count123 = files123.Length;
                    while (File.Exists(dir123 + k.ToString() + ".jpg"))
                    {
                        k++;
                    }
                    if (count123 < 11)
                    {
                        newImg1.Save(Server.MapPath("user_folder") + "\\" + dr1["user_id"].ToString() + "\\" + dr1["categoryId"].ToString() + "\\Small\\" + k + ".jpg", myImageCodecInfo, myEncoderParameters);
                    }
                }
            }
            img9.Dispose();
        }
    }
    private void Big(string filename)
    {
        j = k = 1;
        string dc = Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Small\\";
        DirectoryInfo inc = new DirectoryInfo(dc);
        FileInfo[] filesc = inc.GetFiles("*.jpg");
        if (filesc.Length > 20 && mem == 0)
        {

            Label2.Text = "To upload your more image please update your membership";
        }
        else if (filesc.Length > 50 && mem == 1)
        {
            Label2.Text = "To upload your more image please update your membership";
        }
        else if (filesc.Length > 50 && mem == 2)
        {
            Label2.Text = "To upload your more image please update your membership";
        }
        else if (filesc.Length > 50 && mem == 3)
        {
            Label2.Text = "To upload your more image please update your membership";
        }
        else if (filesc.Length > 50 && mem == 4)
        {
            Label2.Text = "To upload your more image please update your membership";
        }
        else
        {
            System.Drawing.Image img1 =
           System.Drawing.Image.FromFile(Server.MapPath("images/") +
           "logo.png");
            System.Drawing.Image img2 =
            System.Drawing.Image.FromFile(Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Temp\\image\\" + filename);

            //if (img2.Width >= 700)
            //{
            //    w = 700;
            //    if (img2.Height >= 800)
            //    {
            //        h = 800;
            //    }
            //    else
            //        h = img2.Height;
            //}
            //else if (img2.Height >= 800)
            //{
            //    h = 800;

            //    if (img2.Width >= 700)
            //    {
            //        w = 700;
            //    }
            //    else
            //        w = img2.Width;
            //}
            //else
            //{
                w = img2.Width;
                h = img2.Height;
            //}
            System.Drawing.Graphics g;
            System.Drawing.Bitmap newImg = new System.Drawing.Bitmap(w, h);
            g = System.Drawing.Graphics.FromImage(newImg);
            g.DrawImage(img2, 0, 0, w, h);
            g.DrawImage(img1, w - 245, h - 50, img1.Width, img1.Height);
            string dre = Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Big\\";
            while (File.Exists(dre + j.ToString() + ".jpg"))
            {
                j++;
            }
            ImageCodecInfo myImageCodecInfo1;
            Encoder myEncoder1;
            EncoderParameter myEncoderParameter1;
            EncoderParameters myEncoderParameters1;
            myImageCodecInfo1 = GetEncoderInfo("image/jpeg");
            myEncoder1 = Encoder.Quality;
            myEncoderParameters1 = new EncoderParameters(1);
            myEncoderParameter1 = new EncoderParameter(myEncoder1, 60L);
            myEncoderParameters1.Param[0] = myEncoderParameter1;
            newImg.Save(Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Big\\" + j.ToString() + ".jpg", myImageCodecInfo1, myEncoderParameters1);
            DatabaseHelper das = new DatabaseHelper();
            SqlDataReader dr1 = das.ExecuteReader("Select user_id,categoryId from profile_details where user_id=" + uniqueid);
            while (dr1.Read())
            {
                if (dr1["categoryId"].ToString() != catid.ToString())
                {
                    string dre1 = Server.MapPath("user_folder") + "\\" + dr1["user_id"].ToString() + "\\" + dr1["categoryId"].ToString() + "\\Big\\";
                    DirectoryInfo di1 = new DirectoryInfo(dre1);
                    FileInfo[] files123 = di1.GetFiles("*.jpg");
                    int count123 = files123.Length + 1;
                    while (File.Exists(dre1 + k.ToString() + ".jpg"))
                    {
                        k++;
                    }
                    if (count123 < 11)
                    {
                        newImg.Save(Server.MapPath("user_folder") + "\\" + dr1["user_id"].ToString() + "\\" + dr1["categoryId"].ToString() + "\\Big\\" + k.ToString() + ".jpg", myImageCodecInfo1, myEncoderParameters1);
                    }
                }
            }
            img2.Dispose();
        }
    }
    private void deletefiles()
    {
        string temppath = Server.MapPath("UploaderTemp/");
        string temppath1 = Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Temp\\image";
        DirectoryInfo di = new DirectoryInfo(temppath);
        DirectoryInfo di1 = new DirectoryInfo(temppath1);
        FileInfo[] arr = di.GetFiles();
        FileInfo[] arr1 = di1.GetFiles();
        foreach (FileInfo f in arr)
        {
            File.Delete(f.FullName);
        }
        foreach (FileInfo f in arr1)
        {
            File.Delete(f.FullName);
        }
    }
    private int getMember()
    {
        int m = 0;
        string query = "";
        DatabaseHelper das = new DatabaseHelper();
        if ((catid >= 30 && catid <= 39) || (catid >= 120 && catid <= 138) || catid == 140)
        {
            query = "select membertype from c_profile_details where user_id=" + uniqueid + " and categoryid=" + catid;
        }
        else
        {
            query = "select membertype from profile_details where user_id=" + uniqueid + " and categoryid=" + catid;
        }
        SqlDataReader dr = das.ExecuteReader(query);
        while (dr.Read())
        {
            m = int.Parse(dr["membertype"].ToString());
        }
        return m;
    }
    private int countf()
    {
        string dir = Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Big";
        int numFiles;
        files = Directory.GetFiles(dir);
        numFiles = files.Length;
        return numFiles;
    }
    private void showimage()
    {
        string html = "";
        int i = 0;
        string dir = Server.MapPath("user_folder") + "\\" + uniqueid + "\\" + catid + "\\Big";
        DirectoryInfo di = new DirectoryInfo(dir);
        FileInfo[] arr = di.GetFiles("*.jpg");
        if (mem == 5)
        {
            Label1.Text = arr.Length.ToString() + " image out of unlimited ";
        }
        else if (mem == 0)
        {
            Label1.Text = arr.Length.ToString() + " image out of 20 ";
        }
        else
        {
            Label1.Text = arr.Length.ToString() + " image out of 50 ";
        }
        if (arr.Length > 0)
        {
            showImg.Visible = true;
            html = "<table><tr>";
            foreach (FileInfo f in arr)
            {
                if (i % 5 == 0)
                {
                    html += "</tr><tr>";
                }
                html += "<td class=\"classified\"><img id='" + f.Name + "' src='" + "user_folder/" + uniqueid + "/" + catid + "/Small/" + f.Name + "' style='padding:2px 2px 2px 2px; border:1px solid #999999;'/><br/><br/><a href='DeleteImage.aspx?uid=" + uniqueid + "&name=" + f.Name + "&cid=" + catid + "'>Delete Photo</a></td>";
                i++;
            }
            html += "</tr></table>";
            showImg.InnerHtml = html;
        }
        else
            showImg.Visible = false;
    }
    private static ImageCodecInfo GetEncoderInfo(String mimeType)
    {
        int j;
        ImageCodecInfo[] encoders;
        encoders = ImageCodecInfo.GetImageEncoders();
        for (j = 0; j < encoders.Length; ++j)
        {
            if (encoders[j].MimeType == mimeType)
                return encoders[j];
        }
        return null;
    }
    #endregion

}

Monday, 23 April 2012

The IsValidEmail method then calls the Regex.IsMatch(String, String) method to verify that the address conforms to a regular expression pattern.

using System;
using System.Globalization;
using System.Text.RegularExpressions;

public class RegexUtilities
{
   bool invalid = false;

   public bool IsValidEmail(string strIn)
   {
       invalid = false;
       if (String.IsNullOrEmpty(strIn))
          return false;

       // Use IdnMapping class to convert Unicode domain names.
       strIn = Regex.Replace(strIn, @"(@)(.+)$", this.DomainMapper);
       if (invalid)
          return false;

       // Return true if strIn is in valid e-mail format.
       return Regex.IsMatch(strIn,
              @"^(?("")(""[^""]+?""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))" +
              @"(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-\w]*[0-9a-z]*\.)+[a-z0-9]{2,17}))$",
              RegexOptions.IgnoreCase);
   }

   private string DomainMapper(Match match)
   {
      // IdnMapping class with default property values.
      IdnMapping idn = new IdnMapping();

      string domainName = match.Groups[2].Value;
      try {
         domainName = idn.GetAscii(domainName);
      }
      catch (ArgumentException) {
         invalid = true;     
      }     
      return match.Groups[1].Value + domainName;
   }
}

Sunday, 22 April 2012

update panel trigger and animation use in asp.net page

  <div class="form-column">
                        <asp:RadioButtonList ID="categoryList" runat="server" RepeatColumns="5" RepeatDirection="Horizontal" BorderStyle= "None" BorderWidth="0px"
                            AutoPostBack="True" OnSelectedIndexChanged="categoryList_SelectedIndexChanged"  />
                        <asp:RequiredFieldValidator ID="categoryRequiredFieldValidator" runat="server" CssClass="validation-error"
                            ErrorMessage="Not Valid <a href='#'>[For HELP Click Here]<span>Please check category.<ul><li>Select a category.</li></ul></span></a>"
                            ControlToValidate="categoryList" Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>
                    <div class="form-column" style="overflow: visible;">
                    </div>
                </div>
                <div class="form-row">
                    <div class="form-column2">
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <asp:Panel ID="SubcatPanel" runat="server" Visible="false" CssClass="subcategory-info">
                                    <div id="subcatDiv" runat="server">
                                  
                                    <asp:DataList ID="DataList1" runat="server" CellPadding="4" ForeColor="#333333"
                                            Width="400px" RepeatColumns="3" RepeatDirection="Vertical">
                                       
                                        <AlternatingItemStyle BackColor="White" />
                                        <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                                        <HeaderStyle BackColor="AliceBlue" Font-Bold="True" ForeColor="#666666" />
                                        <ItemStyle BackColor="#E3EAEB" />
                                        <SelectedItemStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                                        <HeaderTemplate>Sub Categories</HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("catname") %>' Font-Size="10px" ForeColor="#2c98ba"></asp:Label>
                                        </ItemTemplate>
                                    </asp:DataList>
                                     
                                    </div>
                                </asp:Panel>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="categoryList" EventName="SelectedIndexChanged" />
                            </Triggers>
                        </asp:UpdatePanel>
                        <ajaxToolkit:UpdatePanelAnimationExtender ID="upae" runat="server" TargetControlID="UpdatePanel1">
                            <Animations>
                                <OnUpdating>
                                    <FadeOut duration=".25" Fps="40"  minimumOpacity=".2" />
                                </OnUpdating>
                                <OnUpdated>
                                        <FadeIn duration=".25" Fps="40"  minimumOpacity="0.2" />
                                </OnUpdated>
                            </Animations>
                        </ajaxToolkit:UpdatePanelAnimationExtender>
                    </div>
                </div>

Thursday, 19 April 2012

upload video on server code asp.net

when upload file more then 23 MB provide error in asp.net

 <system.webServer>
            <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="52428800"/>
            </requestFiltering>
        </security>
           </system.webServer>

now you can upload data  50 mb on server save daata in forldr



Happy proggraaming....