02 August 2008
30 July 2008


Get Master Pages tutorials from ASP.Net web site,
There are 10 tutorials what are very useful to learn and also for good pectic for coding. Specifying the Master Page Programmatically and Nested Master are realy useful.
Click Here
There is also available code C# and VB to download.
There are 10 tutorials what are very useful to learn and also for good pectic for coding. Specifying the Master Page Programmatically and Nested Master are realy useful.
Click Here
There is also available code C# and VB to download.


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.
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.
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.
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.
just write
asp: Label
and press enter
asp:Label
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";
}
{
Office.CommandBarComboBox webControl1 = (Office.CommandBarComboBox)this.Application.ActiveExplorer().CommandBars.FindControl(26, 1740, missing, missing);
webControl1.Text = "www.sa-action.blogspot.com";
}
02 June 2008


Subscribe to:
Posts
(
Atom
)