Click here to Skip to main content
15,894,540 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Something like that ;

C#
public SampleConstructor ()
      {
          InitializeComponent();
         string ID=QueryString["ID"].ToString();
}
Posted

1 solution

I don't see why you can't do this but I don't think that's a good design.

I would rather create a parameterised constructor and pass the id to it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900