{"id":1957,"date":"2012-03-28T12:09:55","date_gmt":"2012-03-28T16:09:55","guid":{"rendered":"http:\/\/www.iowawebnet.com\/ein\/?p=1957"},"modified":"2012-03-28T12:10:52","modified_gmt":"2012-03-28T16:10:52","slug":"vb-net-passing-string-value-from-code-behind-to-markup-on-the-page","status":"publish","type":"post","link":"https:\/\/www.iowawebnet.com\/ein\/2012\/03\/vb-net-passing-string-value-from-code-behind-to-markup-on-the-page\/","title":{"rendered":"VB.NET &#8211; passing string value from code behind to markup on the page"},"content":{"rendered":"<pre>\r\nSolution 1\r\n<code>\r\nProtected doit As String = \"Hello\" (in .vb file)\r\n\r\n< %=Me.doit%> (inside the markup)\r\n<\/code>\r\n<\/pre>\n<pre>\r\nSolution 2\r\n<code>\r\n'automatic properties\r\nProtected Property doit2 As String = \"Hello\" (in .vb file)\r\n\r\n< %=doit2%> (inside the markup)\r\n<br \/>\r\n'no automatic properties\r\nPrivate _doit3 As String (in .vb file)\r\nProtected Property doit3 As String\r\nGet\r\n     Return _doit3\r\nEnd Get\r\nSet(value As String)\r\n     _doit3 = value\r\nEnd Set\r\nEnd Property\r\n\r\n< %=doit3%> (inside the markup)\r\n<\/code>\r\n<\/pre>\n<pre>\r\nSolution 3\r\n<code>\r\nPublic doit4 As String = \"Hello\" (in .vb file)\r\n\r\n< %=doit4%> (inside the markup)\r\n<\/code>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Solution 1 Protected doit As String = &#8220;Hello&#8221; (in .vb file) < %=Me.doit%> (inside the markup) Solution 2 &#8216;automatic properties Protected Property doit2 As String = &#8220;Hello&#8221; (in .vb file) < %=doit2%> (inside the markup) &#8216;no automatic properties Private _doit3 As String (in .vb file) Protected Property doit3 As String Get Return _doit3 End Get [&hellip;]<\/p>\n","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85,17,16,84],"tags":[19,89,91,90],"class_list":["post-1957","post","type-post","status-publish","format-standard","hentry","category-net-4-0","category-applications","category-net","category-vs2010","tag-asp-net","tag-string","tag-value","tag-variable"],"_links":{"self":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts\/1957"}],"collection":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/comments?post=1957"}],"version-history":[{"count":9,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts\/1957\/revisions"}],"predecessor-version":[{"id":1966,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts\/1957\/revisions\/1966"}],"wp:attachment":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/media?parent=1957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/categories?post=1957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/tags?post=1957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}