Hi,
I have a webform that will pop up window by clicking button or links
inside data grid.
Here are some sample code snippet:
'For button
btnOrder.Attrib utes.Add("oncli ck", "window.open('o rder.aspx?..... ........
'For datagrid
<asp:TemplateCo lumn>
<ItemTemplate >
<a href="#" onclick="window .open('Modules/AR/order.aspx..... ....">Order</a>
</ItemTemplate>
</asp:TemplateCol umn>
In both instances I use window.open on client side to pop up new window.
The strange thing is, at some occasions I have to use Modules/AR/order.aspx
to open, at other I will have to use the file name order.aspx only without
the path.
The struture in my machine: I have a ASP.Net web application in
http://localhost/Dev. all related aspx files are located in
http://localhost/Dev/Modules/AR directory.
Right now I have to try and err every time to find out if I need to add path
to the filename.
Can somebody suggest a better way to do this? I don't think using absolute
path can resolve my problem either, becase my current application is at
http://localhost/Dev , the application could be moved to
http://someserver/Live or others.
so /dev/Modules/AR/order.aspx is no good for me either.
TIA