{"id":65,"date":"2008-08-28T11:54:00","date_gmt":"2008-08-28T11:54:00","guid":{"rendered":"http:\/\/www.mirageglobe.com\/wp\/?p=65"},"modified":"2008-08-28T11:54:00","modified_gmt":"2008-08-28T11:54:00","slug":"c-asp-settings","status":"publish","type":"post","link":"https:\/\/pages.alldaycity.com\/mirageglobe\/c-asp-settings\/","title":{"rendered":"C# ASP Settings"},"content":{"rendered":"<div dir=\"ltr\">Access public variables and functions from dynamic controls<br \/>Adapted from <a href=\"http:\/\/aspalliance.com\/565_Dynamic_Loading_of_ASPNET_User_Controls\" target=\"_blank\">ASPAlliance<\/a><\/p>\n<p>Thanks to Douglass who submitted this where it explains on how to access Public variables\/functions of a Dynamically created User control or custom control in ASP.net c#.<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>Title:  Solution to accessing properties dynamically<br \/>Name: Daniel C. Douglass<br \/>Date: 5\/20\/2005 12:25:31 PM<br \/>Comment:<br \/>Class name of Custom Control: New_Vote<br \/>Public Properties (in New_Vote): DirectorName, VoteID<br \/>Custom Control Filename: New.Vote.ascx<\/p>\n<p>The following code should be placed in the code-behind of the web form calling the user control:<\/p>\n<p>\/\/### load user control<br \/>Control c = LoadControl(&#8220;Controls\/New.Vote.ascx&#8221;);<\/p>\n<p>\/\/### cast the generic control to be voting control<br \/>New_Vote Vote = (New_Vote)c;<\/p>\n<p>\/\/### set control properties<br \/>Vote.DirectorName = &#8220;Daniel C. Douglass&#8221;;<br \/>Vote.VoteID = 117;<\/p>\n<p>TitlePanel.Controls.Add(Vote);<br \/>This should help everyone!<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Access public variables and functions from dynamic controlsAdapted from ASPAlliance Thanks to Douglass who submitted this where it explains on how to access Public variables\/functions of a Dynamically created User control or custom control in ASP.net c#. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; Title: Solution to accessing properties dynamicallyName: Daniel C. DouglassDate: 5\/20\/2005 12:25:31 PMComment:Class name of Custom Control: New_VotePublic [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-65","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":0,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"wp:attachment":[{"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pages.alldaycity.com\/mirageglobe\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}