| Author | Messages | |
edmund
 Posts:2

| | 03/02/2007 11:18 AM |
| I am not sure if this feature exists in PageBlaster.
Does the module allow for automatic replacement of contol Ids at the HTML output so that a long name (as produced by ASP.NET's NamingContainer) will be a unique short one? For example, a control that is regularly uniqued at the client as 'ctl00_MyControl_MyBaseControl_ctl01' may become 'a1'?
(This is probably a two way encoding as the original name is needed at the server when a postback occurs).
Edmund
| | | |
| |
| John Mitchell Posts:3353


| | 03/02/2007 11:29 AM |
| Hi Edmund, Using Regex you could create a Replacement Rule to do that for the Response Html, but as you point out that long name may be needed in the Post-Back to the server.
If I were doing it, I would leave any that were required for post-back unchanged.
If you are trying to do this so that you have client-side access to the elements that are created by server controls, then you might consider wrapping your server-side control in a regular client-side div and giving it a short ID.
If you are just wanting to reduce the size of the output then I think the processing required for the replacements is probably not worth it. | | | |
| edmund
 Posts:2

| | 03/02/2007 12:43 PM |
| Thanks John for the reply.
My intention was to reduce the size of the HTML transferred.
As you know, NamingContainer Ids can become very long, very fast. And once you have those in grids, etc., they are all over. Changing them in the ASP.NET source makes it harded to debug (become non-meaningful names), so I was thinking of such a module.
And yes, you are right, that the processing overhead may become not worth it.
Thanks anyhow, Edmund
| | | |
|
|