Closed GoogleCodeExporter closed 9 years ago
We can't, because Page Validation happens, IIRC, during Page Load. That way, we
have to have the keys set before it is validated (otherwise, it won't validate
at all).
Any specific reason why you need the keys populated at a later time?
Original comment by adrian.g...@gmail.com
on 23 Jan 2011 at 3:48
I just wanted to set them up imperatively, by reading from config file, but
looks like it can be done declaratively only.
I have 4 recaptchas in my web controls project. Just see how users will be
surprised when they won't be able to fulfil keys on page init event.
Original comment by microsof...@gmail.com
on 23 Jan 2011 at 8:12
In control constructor, you can specify AppSettings key to populate the keys
without declaring it.
this.publicKey = ConfigurationManager.AppSettings["RecaptchaPublicKey"];
this.privateKey = ConfigurationManager.AppSettings["RecaptchaPrivateKey"];
I still don't understand your problem. Can you post a sample code that
illustrates what you're trying to achieve? Any configuration value should be
available to use during Page_Init.
Original comment by adrian.g...@gmail.com
on 24 Jan 2011 at 1:57
Original issue reported on code.google.com by
microsof...@gmail.com
on 22 Jan 2011 at 5:13