protected override void OnLoad(EventArgs e) { base.OnLoad(e); string markup = File.ReadAllText(Server.MapPath("~/Default.aspx")); Match match = Regex.Match(markup, "Inherits[ ]+=[ ]+", RegexOptions.IgnoreCase); if (match.Success) markup = markup.Replace(match.Value, "Inherits="); int l = markup.IndexOf("Inherits=\"") + 10; int u = markup.IndexOf("\"", l); string type = markup.Substring(l, u - l); string assemblyName = Assembly.GetExecutingAssembly().FullName; Page page = Activator.CreateInstance(Type.GetType(type)) as Page; }
Thursday, August 12, 2010
How to create page object using Markup file name of asp.net page
Subscribe to:
Post Comments (Atom)
Azure Storage Account Types
Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...
-
Why we need asynchronous tasks? Execute a time consuming operations in parallel to the CLR thread which execute the request If you have ...
-
Demo: I was thinking a way to show images before actually uploading them to server. I would say to preview images using javascript. Obv...
No comments:
Post a Comment