by rBellantoni
8/24/2009 11:31:00 AM
Recently I faced an issue where I had two user controls. Inside one of the controls I needed to call a load function from the other control that are both in the same aspx page. So to do this I wired up a new handler in the page load event of the main aspx page. The page that contains both user controls like so:
this.UserControl.OnAddNewButtonClicked += new Controls_UserControl.AddNewButtonClicked(AddNewButtonClicked);
Then I created the function for this to attach to:
public void AddNewButtonClicked(object sender, EventArgs e)
{
}
Inside the control that we are doing the calling from we create the delegate and the event:
public partial class Controls_UserControl : System.Web.UI.UserControl
{
public delegate void AddNewButtonClicked(object sender, EventArgs e);
public event AddNewButtonClicked OnAddNewButtonClicked;
}
Now inside of the event that we would like to fire the function from the other usercontrol we reference the delegate:
public void btnAddNew_Click(object sender, EventArgs e)
{
try
{
// Save the form
SaveForm();
pnlMessage.Visible = true; if (OnAddNewButtonClicked != null)
{
OnAddNewButtonClicked(sender, e);
}
}
catch (Exception ex)
{
HandleError(ex);
}
}
Now inside of the function we created earlier in the main aspx page, we can call whatever usercontrol.function we would like to fire:
public void AddNewButtonClicked(object sender, EventArgs e)
{
LoadControls();
}
be942aae-10aa-4729-8a11-1865a5252bab|2|5.0
Tags:
by ebarcza
8/24/2009 11:21:00 AM
What does Bounce Rate mean?
As defined by Google:
Bounce rate is the percentage of single-page visits or visits in which the person left your site from the entrance (landing) page. Use this metric to measure visit quality - a high bounce rate generally indicates that site entrance pages aren't relevant to your visitors. The more compelling your landing pages, the more visitors will stay on your site and convert. You can minimize bounce rates by tailoring landing pages to each keyword and ad that you run. Landing pages should provide the information and services that were promised in the ad copy.
7f6bef52-fb3d-4f7e-9f7a-ea1cff474025|0|.0
Tags: bounce rate
by ebarcza
8/21/2009 5:45:00 AM
First the Classic
I set this in my login script or alternativwly can be set in the Global.asa in the Session_OnStart Event
Session.Timeout = 120 -- 120 being the number of minutes.
sub Session_OnStart
'120 minutes
Session.Timeout = 120
end sub
Now ASP.NET
Via Web Config
<sessionState timeout="60" />
by rBellantoni
8/6/2009 11:13:00 AM
There is no colspan in an RDLC, however you can merge cells, especially useful for long headers in the group by section. You can highlight the cells you want to merge and right click and merge them. Essentially performing the same as a colspan.
41730f87-8b0b-4a77-8cc1-9e8938caf9da|2|4.0
Tags: