Saturday, October 26, 2013

File name change before saveAs()


string fileName= DateTime.Now.ToString("yyyyMMddHHmmtt") + fileExt; resumeUplaod.SaveAs(Server.MapPath("Resume/") + fileName);

Friday, October 25, 2013

AJAX Control Toolkit error: ""sys.extended.ui is null or not an object"

When using the AJAX Control Toolkit you see a strange error: you recieve a client-script exception message that says "system.extended.ui is null or not an object".

 

 

The fix is to ensure that the ToolkitScriptManager on the page has the CombineScripts attribute set to false as shown:

<ajaxToolkit:ToolkitScriptManager runat="server" ID="ajaxScriptManager" EnablePartialRendering="true" CombineScripts="false" /> 

The ToolkitScriptManager class derives from ScriptManager and enables the automatic combining of multiple script files in the corresponding web page. Any scripts (and localized script resources) coming from assemblies indicating their willingness to have their scripts combined (with the new assembly-level ScriptCombine attribute) will automatically be combined into one file for download by the user's browser. This combining action (and the automatic compression of the resulting file) can dramatically reduce the number of round-trips made by the browser to fetch scripts and correspondingly improve the page's responsiveness.

While desireable,  this behavior can still clobber some pages, causing the above-referenced error, which is why the CombineScripts="false" attribute is provided.



By Peter Bromberg
ref :
http://www.nullskull.com/faq/850/ajax-control-toolkit-error-sysextendedui-is-null-or-not-an-object.aspx

 

Thursday, October 17, 2013

refresh dropdown list with out change stateview in asp.net


---------------in page load ------------------------------------------------------------------------
 //craete view stat object carry the selected data on dropdownlist

  ViewState["DropDownList3"] = DropDownList3.SelectedValue;

--------------------------in the event button ---------------------------------------------------------
  protected void DetailsView1_ItemUpdated(object sender, DetailsViewUpdatedEventArgs e)
        {
       
// on the event fire now will refersh the dropdown datat and keep the state view
            DropDownList3.DataBind();

            if (ViewState["DropDownList3"] != null)
            {
              

                DropDownList3.SelectedValue = ViewState["DropDownList3"].ToString();
            }
        }

How to refresh Gridview after pressed a button in asp.net ?


after updating data you may need to refresh the grid to see the new data ----------------solution ------------------------

 protected void UpdateButton_Click(object sender, EventArgs e) { //your same code ........ GridView1.DataBind(); }

MS in Computer Science with paid training in USA company