I'm trying to add dynamically a control CalendarExtender
from ASP.NET Ajax Toolkit to the WebForm page. When I'm accessing the WebPage, where I've coded this control to be added - I've got an error:
MissingManifestResourceException
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "AjaxControlToolkit.Properties.Resources.NET4.resources" was correctly embedded or linked into assembly "AjaxControlToolkit" at compile time, or that all the satellite assemblies required are loadable and fully signed.
Piece of code, where does occur the error:
// set User birthdate
Label labelUserBirthdate = new Label();
labelUserBirthdate.ID = "editableLabelSecondName";
labelUserBirthdate.Text = "Bithday: ";
TextBox editableBirthdate = new TextBox();
editableBirthdate.ID = "editableTextBoxBirthday";
editableBirthdate.CssClass = "round default-width-input";
CalendarExtender birthdateCalendar = new CalendarExtender();
birthdateCalendar.ID = "calendarExtender" + Guid.NewGuid().ToString();
birthdateCalendar.TargetControlID = "editableTextBoxBirthday";
this.contentViewWebdata.Controls.Add(labelUserBirthdate);
this.contentViewWebdata.Controls.Add(Page.ParseControl("<br />"));
this.contentViewWebdata.Controls.Add(editableBirthdate);
this.contentViewWebdata.Controls.Add(birthdateCalendar);
this.contentViewWebdata.Controls.Add(Page.ParseControl("<br />"));
Full code (problem does occur on SetSceneEditableUserInfo()
):
I have searched in Web such topics and other people do the same things:
As you see I'm doing the similar stuff. Why does it argue on Resources? I don't understand:
How can I fix my issue?
The problem has been solved by myself.
The problem occured because I forgot to add dynamically the ToolkitScriptManager
control to the page. Now it's working.