|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do I find out the page name in ASPI know it’s trivial but I need it quickly. How do I find out the page name
in ASP, which I am currently using? I did that before but I cannot remember. I remembered it’s in Server or Application object collection, but could not find out. Thanks for help. Charts I do it this way:
<code> Dim pn As String = Me.Page.ToString() pn = pn.Substring(4, pn.IndexOf("_aspx") - 4) </code> What name do you want? The page's class? the actual *physical* page
that was called, the currently executing page (after a server.transfer, etc), after a path remapping ? :) Since you mention server variables, I think the var is "script_name", ie : Request.ServerVariables["SCRIPT_NAME"]... FYI, I would just turn on trace, ok, and at the bottom you will see the entire serverVariables collection output. Just check that for the variable you need, then call it like above :) - Andrew Andrew,
Request.ServerVariables["SCRIPT_NAME"] is exactly what I wanted. Thanks so much. Charts Show quoteHide quote "Andrew Backer" wrote: > What name do you want? The page's class? the actual *physical* page > that was called, the currently executing page (after a server.transfer, > etc), after a path remapping ? :) > > Since you mention server variables, I think the var is "script_name", > ie : > > Request.ServerVariables["SCRIPT_NAME"]... > > FYI, I would just turn on trace, ok, and at the bottom you will see the > entire serverVariables collection output. Just check that for the > variable you need, then call it like above :) > > - Andrew > >
Cannot change font in Webcontrol treeview node
REPOST: How can I change the color of the Selected Item in a list TREENODETYPES attribute does not work Timer.Elapsed event doesn't want to fire Stack Over Flow Message in IE Calling an ASP File From ASP.net page Send email bu clicking button Datagrid navigation problem Using OpenFileDialog Using OpenFileDialog |
|||||||||||||||||||||||