Friday, November 18, 2011

Modal popup-;extender control with asp. net

Normal ajax popup extender control is using the client side calls.

so from backside if we want to starts the modal control from code
then first we have to give the faxe control for target control id

then from code we can show extender.Show(); method

then we can choosse the update panel to open it also at the time of update panel.


Thanks & Regards
Nipam Budhabhatti

Friday, August 5, 2011

Javascript with Scriptmanager

ScriptManager.RegisterClientScriptBlock(thistypeof(Page), "xxx""alert('Hello World!');"true);

Wednesday, August 3, 2011

Monday, May 23, 2011

Inheritance


When we are calling the object of child class. always constructor of base class calls the first

In desctructor it is always first desctuct the child object than parent

A a2 = new B();      allowed

but we can not give reference of parent to child.


as int are structs and cannot have reference to object
int is using IEquatable interface to implement
which contains Equals method through which int can chek equality comparison there.

***************************************
namespace Test2
{
 public class A
 {
  public A()
  {
   Console.WriteLine("This class A");
  }
 }
 
 public class B : A 
 {
  public B()
  {
   Console.WriteLine("This class B");
  }
 }
 
 
 public class C : B
 {
  public C()
  {
   Console.WriteLine("This class C");
  }
 }
}




namespace Test2
{
 class Program
 {
  static void Main(string[] args)
  {
   A a = new A();
   System.Console.Read();
   B b = new B();
   System.Console.Read();
   C cC1 = new C();
   System.Console.Read();
  }
 }
}

File Upload Control in asp.net is not working with the update panel

Hi All

We are facing the problem of file upload control with the update panel
To solve this we need to do following thngs


<form id="form1" runat="server">
    <asp:FileUpload ID="FileUpload1" runat="server" />
    <asp:UpdatePanel ID="Updatepanel1" runat="server">
        <Triggers>
            <asp:PostBackTrigger ControlID="Button1" />
        </Triggers>
        <ContentTemplate>
            
            <p>
                <asp:Button ID="Button1" runat="server" Text="Upload" OnClick="Button1_Click" /></p>
            <p>
                <asp:Label ID="Label1" runat="server"></asp:Label></p>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>


It is working with below texts

Page.Form.Attributes.Add("enctype", "multipart/form-data");

asynch file upload

<ajaxToolkit:AsyncFileUpload OnClientUploadError="uploadError"     OnClientUploadComplete="uploadComplete" runat="server"     ID="AsyncFileUpload1" Width="400px" UploaderStyle="Modern"     UploadingBackColor="#CCFFFF" />