Click here to Skip to main content
16,015,531 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to fetch data when i will click on DataNavigateUrlFields where text = "MASTER"
Error i m getting is.....

Error 1 System.Web.UI.WebControls.DataControlFieldCollection must have items of type 'System.Web.UI.WebControls.DataControlField'. 'asp:Label' is of type 'System.Web.UI.WebControls.Label'. F:\Project\TelephoneDirectoryApp\EmpFetch.aspx 42

Error 2 Literal content ('') is not allowed within a 'System.Web.UI.WebControls.DataControlFieldCollection'. F:\Project\TelephoneDirectoryApp\EmpFetch.aspx 42




<asp:gridview id="grdJobHistory" bordercolor="AliceBlue" runat="server" cellpadding="4" font-names="verdana" font-size="Small" forecolor="#333333" gridlines="Vertical" xmlns:asp="#unknown">
Width="100%" AutoGenerateColumns="False" AllowPaging="True" OnPageIndexChanging="grdJobHistory_PageIndexChanging">
<footerstyle backcolor="#5D7B9D" font-bold="True" forecolor="White">
<rowstyle backcolor="#f2f9ff" forecolor="#333333">
<editrowstyle backcolor="#999999">
<selectedrowstyle backcolor="#E2DED6" font-bold="True" forecolor="#333333">
<pagerstyle backcolor="#284775" forecolor="White" horizontalalign="Center">
<headerstyle backcolor="#6699cc" font-bold="True" forecolor="White">
<alternatingrowstyle backcolor="White" forecolor="#284775">
<columns>
<asp:hyperlinkfield datanavigateurlfields="Ecode,EmployeeName,Designation,Location" datanavigateurlformatstring="UpdatePage.aspx?ECODE={0}&ENAME={1}&DESIGNATION={2}&LOCATION={3}" text="MASTER">

<asp:boundfield datafield="ECODE" itemstyle-horizontalalign="Left" headerstyle-horizontalalign="Left" headertext="ECODE" sortexpression="ECODE">
<asp:label id="LABELCODE" runat="server" text="<%# Eval(" ecode")="" %&gt;"="">

<asp:boundfield datafield="EMPLOYEENAME" itemstyle-horizontalalign="Left" headerstyle-horizontalalign="Left" headertext="EMPLOYEENAME" sortexpression="EMPLOYEENAME">
<asp:boundfield datafield="DESIGNATION" itemstyle-horizontalalign="Left" headerstyle-horizontalalign="Left" headertext="DESIGNATION" sortexpression="DESIGNATION">
<asp:boundfield datafield="LOCATION" itemstyle-horizontalalign="Left" headerstyle-horizontalalign="Left" headertext="LOCATION" sortexpression="LOCATION">

<asp:templatefield>





<pagersettings previouspagetext="Previous" nextpagetext="Next" firstpagetext="First" lastpagetext="Last">


Posted

1 solution

Hello,
Can u please paste in your piece of code so that i can see what u tried and wher's your mistake

Thanks & Regards
Radix
 
Share this answer
 
Comments
Ankur\m/ 13-May-10 1:01am    
This is not an answer to the question and so must be put in comments. You could select 'Add Comment' below the user's question to ask him to format his code.

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