Tuesday

ASP.NET/csharp:FileUpload inside AJAX Update panel

To make it working it's required :
1.Created interface:

public interface ITriggerable {
void RegisterPostbackTrigger(Control parent,Control trigger);
}


2.implement this interface on page containing ajax update panel:

public void RegisterPostbackTrigger(Control parent,Control button){
PostBackTrigger trigger = new PostBackTrigger();
trigger.ControlID =((Button) button).UniqueID;
UpdatePanel1.Triggers.Add(trigger);
}


3.Add button inside of control as trigger:

protected override void OnInit(EventArgs e){
base.OnInit(e);
((ITriggerable)this.Page).RegisterPostbackTrigger(this, btnRename);
}

No comments:

imagemagic add text to image

rem different types of text annotations on existing images rem cyan yellow orange gold rem -gravity SouthWest rem draw text and anno...