>as well as the compiler VBx (VB 10) are both being written in VB.NET ! Finally a chance for VB to destroy itself!! Wooohooo! :->
Stonie
Posts
-
Microsoft Compilers written in VB -
Access to the Title Element of an HTML PageUse an inside your title tags and set its .Text property in your code behind. ;) Andrew Stone. http://andrewstone.net
-
Integrating Flash actionscript with ASP.NetXML works well as a data mechanism. Write XML with .Net and read it with your flash client? Andrew Stone. http://andrewstone.net
-
The difference between <%=var%> and <%#var#>Hello everyone, I was hoping someone could give me an answer or a link to a good article of the difference between using data binders for simple properties and using response.write for simple properties in aspx pages. Some context to my question: I have some webforms that contain of various types. At run time if a control contains a particular value, I modify the controls collection and add a div around the control. Like this: public static void AddErrorContainer(Control control) { HtmlGenericControl errorDiv = new HtmlGenericControl("div"); errorDiv.Attributes.Add("class", "errorBox"); control.Parent.Controls.AddAt(control.Parent.Controls.IndexOf(control)+1, errorDiv); control.Parent.Controls.Remove(control); errorDiv.Controls.Add(control); } However if the control that I am trying to add the div to contains an script blocks for example: <%=var%> a runtime error is thrown. “Cannot modify the controls collection when script blocks are present” However if I switch to data binders IE: <%#var%> and call this.DataBind() in the page_load() then everything is fine? My question then is: What is the difference between the two methods? I realise that the response.write method writes to the output stream? And databinder is invoked when DataBind is called? But… what is the difference internally? Why is it not possible to modify the controls collection when script blocks are present? I have been having trouble finding any good documentation on this, if anyone could give me an answer or a URL, that would be great. Thanks in advance. :-D Kind regards, Andrew. Andrew Stone. http://andrewstone.net