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?
 
krunal_shahConnect With a Mentor Commented:
change like,

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

you need to replace "1" with the "page" number
0
 
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
 
Tapan PattanaikSenior EngineerAuthor Commented:
>>>>..you need to replace "1" with the "page" number<<<<<<

can you describe more on that.

Thanks
Tapan Pattanaik
0
 
krunal_shahConnect With a Mentor Commented:
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
All Courses

From novice to tech pro — start learning today.