30 July 2008

I was trying to validate FCK Editor, that user must have to enter some value in Editor using RequiredFieldValidator.

But I found that, Required Field Validator will not work with FCK editor directly until you did not change “EnableClientScript” equal to “false".

But CustomValidator will work with FCK editor.

There are two ways to add FCK Editor in ASPX page.

Add Editor using JavaScript




Or Add Editor using FCK Editor Component form Toolbox.



Now Add Custom Validator control to the page.


OK now we have to create a JavaScript function which one help us to check validation.


Done. Run the page and you can see that you must have some value in FCK Editor else it will not post server side event.

22 July 2008

How to Load User Control Dynamically and also access it's property dynamically.

support u have two user control

User Control "a0"


%@ Control Language="C#" AutoEventWireup="true" CodeFile="a0.ascx.cs" Inherits="UserControlTest_a0" %

asp:TextBox ID="TextBox1" runat="server">asp:TextBox>

br /


asp:Button ID="Button1" runat="server" Text="Button" /


And there is a property to something for text value in it's CS file.

public string TextValue
{
get { return TextBox1.Text; }
set { TextBox1.Text = value; }
}


Now User Control "a1"

%@ Control Language="C#" AutoEventWireup="true" CodeFile="a1.ascx.cs" Inherits="UserControlTest_a1" %


%@ Register src="a0.ascx" tagname="ASP" tagprefix="ASP" %


Now in the page load event of this second user control I want to load "a0" user control and also want to set it's "TextValue" property.

protected void Page_Load(object sender, EventArgs e)
{
///Load Control
UserControl ucDynamic = (UserControl)LoadControl("a0.ascx");

///Add User control to the page
this.Controls.Add(ucDynamic);

///Change Property value for newely added user cotrol
///here "UserControlTest" is the name of the folder in my test web site, user have to change it
((UserControlTest_a0)ucDynamic).TextValue = "saAction";
}


It mans there are two user controls "a0" and "a1", Using "UserControl" we can add user control dynamically and to access it's property we have to convert that variable in to our user control.


14 July 2008

08 July 2008

Create Online HTML from

Get all CSS free!!!


Click here

05 July 2008

Don't type too much in aspx page!

just write

asp: Label

and press enter

asp:Label runat=”server” id=”asp_Label2943″ />

Download this add-in from here

Unzip download and copy to :

C:\Documents and Settings\[USER]\Application Data\Microsoft\MSEnvShared\Addins

if you did not found "MSEnvShared" and "Addins" folder then create it manually.

24 June 2008

private void ThisAddIn_Startup(object sender, System.EventArgs e)
{

Office.CommandBarComboBox webControl1 = (Office.CommandBarComboBox)this.Application.ActiveExplorer().CommandBars.FindControl(26, 1740, missing, missing);

webControl1.Text = "www.sa-action.blogspot.com";

}

10 June 2008

Find, Download Cool Icon over the net,


Click Here.

02 June 2008

See this example:

This is a simple two classes "Property" and "Customer", you can see that "Cusomer" class has a method named "PropertyTest" and it will return "Property" class.

See the intelsense list.


but now this the same method intelsense list.



this is coding stuff for C#

29 April 2008

Convert code C# to VB and VB to C# online.



Click Here

02 April 2008

This is one kind of RSS Reader software.

Using MSDN Reader we can brows MSDN Magazine very easily.

This is available on WidowsClient.net







Download MSDN Reader