web user control

hi Experts,

                  I am designing a WebUser Controls for my project.  when I try to build my project  I got the error.


Error    8    No overload for method 'ToDepartment' takes '1' arguments    C:\BallonShop\UserControls\DepartmentsListl.ascx    8

I have attached the screen shot. Please help me to solve this issue.

Tapan Pattanaik
LVL 22
Tapan PattanaikSenior EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

the error is because ToDepartment method take two parameters,
string departmentid and string page..
while you are passing only departmentid in your code..
you need to pass second parameter also.
change like,

NavigateUrl  = '<%#Link.ToDepartment(Eval("DepartmentID").ToString(),"1")%>'

you need to replace "1" with the "page" number

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Tapan PattanaikSenior EngineerAuthor Commented:
>>>>..you need to replace "1" with the "page" number<<<<<<

can you describe more on that.

Tapan Pattanaik
you have created ToDepartment number to accept string page parameter also, so you need to passs it,
public static string ToDepartment(string departmentId, string page)

you also need to pass string page as you are passing departmentid
Tapan PattanaikSenior EngineerAuthor Commented:
You (Krunal)  are a Real Expert and you solve my problem within  a few seconds of time.

Have a Great Evening.

Tapan Pattanaik
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.