TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajveer singh
800
1k
251k
Incorrect syntax near 'Implementation'
Nov 18 2015 11:42 PM
my UI
"My moto click any link open pdf file in new window but i want not use query string for security purpose"
my aspx .code
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false"
GridLines="None" Width="900px" CssClass="gridview" DataKeyNames="idno"
HeaderStyle-CssClass="header" RowStyle-CssClass="rows"
onrowdatabound="GridView1_RowDataBound">
<Columns>
<asp:TemplateField HeaderStyle-Width="10px">
<ItemTemplate>
<%#Container.DataItemIndex+1 %>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="?????">
<ItemTemplate>
<asp:HyperLink ID="bnv" runat="server" ToolTip='<%# string.Format("{0}=>[{1}]",Eval("link_level3"),Eval("url")) %>' CssClass="raj " Width="100%" Target="_New" Text='<%# Eval("link_level3") %>'></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
cs code on row databound
{
string filepath = "WriteReadData/documents/";
if (e.Row.RowType == DataControlRowType.DataRow)
{
HyperLink hl = (HyperLink)e.Row.FindControl("bnv");
if (hl != null)
{
DataRowView drv = (DataRowView)e.Row.DataItem;
Session["id"] = drv["idno"].ToString();
//string lsDataKeyValue = GridView1.DataKeys[e.Row.RowIndex].Values[0].ToString();
SqlConnection con = new SqlConnection(str);
string query = "select filename from level3 where link_level3='" + hl.Text + "' ";
SqlCommand cmd = new SqlCommand(query,con);
con.Open();
string file_name = (string)cmd.ExecuteScalar();
con.Close();
if (file_name != null)
{
hl.NavigateUrl = filepath + file_name;
}
}
}
}
Error generate on page load
how to solves this please guid me
Thanks
Reply
Answers (
10
)
How to consume the JSON data in Grid in Web API dynamic way
How to avoid thus CS0266: Cannot implicitly convert type 'Sy