How can I get the value of the master ID in a Page Load server script of the detail table.
fk_ID read value in server script
-
- User
- Posts: 4
I want to set default values for the Add Page of the detail table by sql-reading the master-table. For that I need the key (master ID) in my script.
I know it is in the URL but I want it in the code and do not know how.
Thanks.
-
- User
- Posts: 4
Found a solution in ASP.NET C#.
Reading the URI works with : HttpContext.Current.Request.Url
To extract the master key in string-format (needed for my next SQL-string):
string strOrderID = (HttpContext.Current.Request.Url.Query.Split('='))[2];
Not so difficult, after all. ;-)