Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Stonie

@Stonie
About
Posts
4
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Microsoft Compilers written in VB
    S Stonie

    >as well as the compiler VBx (VB 10) are both being written in VB.NET ! Finally a chance for VB to destroy itself!! Wooohooo! :->

    The Lounge csharp asp-net

  • Access to the Title Element of an HTML Page
    S Stonie

    Use an inside your title tags and set its .Text property in your code behind. ;) Andrew Stone. http://andrewstone.net

    ASP.NET html help question

  • Integrating Flash actionscript with ASP.Net
    S Stonie

    XML works well as a data mechanism. Write XML with .Net and read it with your flash client? Andrew Stone. http://andrewstone.net

    ASP.NET csharp asp-net adobe question

  • The difference between <%=var%> and <%#var#>
    S Stonie

    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

    ASP.NET question csharp tools help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups