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:

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.

Thank
Tapan Pattanaik
Bangalore,India
UserControlError.JPG
UserControlError-CodeBehind.JPG
Link.JPG
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.

krunal_shahCommented:
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.
0
krunal_shahCommented:
change like,

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

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

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.

Thanks
Tapan Pattanaik
0
krunal_shahCommented:
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
0
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.

Thanks,
Tapan Pattanaik
0
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
ASP.NET

From novice to tech pro — start learning today.