Monday, February 10, 2014

Issue Adding SharePoint lookup field in Visual Studio


Issue: Once defined a lookup field on Visual studio 2012, it will not work on sharepoint

Resolution:
In the property of the lookup field provide a relative URL "list/listname" instead of providing List Name




Tuesday, February 4, 2014

How to fire button click event on page load in asp.net automatically


1. you can directly call your button click event like this.
    //btnSubmit is my asp.net button control's id
    btnSubmit_Click(btnSubmit,null);

2. or using jquery like this..
$(document).ready(function(){
   //Id of your button control either it is server  control or simple html control
   $("[id*='btnSubmit']").click();
});


3. if you want to call your button click event in your page load you can directly call like
protected void Page_Load(object sender, EventArgs e)
{
    //btnSubmit is my asp.net button control's id
    //It will fire each and every time your page load event is fire.
    btnSubmit_Click(btnSubmit,null);
}