Handover of page id to a widget?

Topics: Business Logic Layer, Controls
Sep 21, 2013 at 11:09 PM
Hi there,

is there a way to determine the page id within a widget?
I'm working on a widget, that has an option to configure on which page(s) it should be valid. I'm using the Guid from the Core datamodel - but it seems I have no way to read the page id at runtime from within the widget, right?
What ist the best way to achieve this?

Thanks!
Sep 22, 2013 at 10:53 AM
Edited Sep 22, 2013 at 10:54 AM
ok, I found out how to use the Request.Querystring["ID"] to get the page id... omg, I've burned three hours before this came to my mind... :D
Sep 22, 2013 at 10:55 AM
Edited Sep 22, 2013 at 10:57 AM
You should be able to get what you need by reading the URL.

One example being the Page_Load method in default aspx.cs(which might be along the lines of what you are looking for).

Edit
See you already sussed it.