The Lucknow bench of the high court had earlier issued a notice to the Attorney General, the country's top law officer, following which Additional Solicitor General Ashok Mehta and UP Advocate General Raghvendra Singh appeared in the court today.
The court asked them to file a counter-affidavit so that the matter could be decided.
A division bench comprising Justices Sudhir Agrawal and Virendra Kumar passed the order on the petition filed by Sanjai Sharma.
The petitioner cited the Constitution to say that a parliamentarian cannot become a minister in the state government.
The petitioner also challenged the constitutionality of section 3(A) of the Parliament (Prevention of Disqualification) Act.
Since the constitutionality of a central act cannot be tested without hearing the Attorney General, the court issued a notice to him.