473,386 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

DataGrid doubt

<tr>
<td><font size="0"><%# DataBinder.Eval(Container.DataItem,
"PostedDate") %></font></td>
</tr>
<tr>
<td align="right"><font size="0"><a href="edit.aspx?blogid=<%#
DataBinder.Eval(Container.DataItem, "BlogID")%>&msgid=<%#
DataBinder.Eval(Container.DataItem, "MessageID") %>">Edit</a></font></td>

</tr>

That's part of the itemtemplate of my datgrid. I want the BlogID and the
MessageID parameters to be added to the querystring of the hyperlink, while
databinding. But it shows an error. It does not allow me to switch to the
design view. It also causes compilation error.

I ultimately want to get something like:
<a href=edit.aspx?blogid=2&msgid=3>Edit</a>in the <td> tag

How can I correct it?

Thanks
SeeSharp
Nov 17 '05 #1
2 914
in this case replace "" by ' !!

example :

<tr>
<td align="right"><font size="0"><a
href='edit.aspx?blogid=<%#
DataBinder.Eval(Container.DataItem, "BlogID")%>&msgid=<%#
DataBinder.Eval(Container.DataItem, "MessageID") %
'>Edit</a></font></td>
</tr>
-----Original Message-----
<tr>
<td><font size="0"><%# DataBinder.Eval (Container.DataItem,"PostedDate") %></font></td>
</tr>
<tr>
<td align="right"><font size="0"><a href="edit.aspx?blogid=<%#DataBinder.Eval(Container.DataItem, "BlogID")%>&msgid=<%#
DataBinder.Eval(Container.DataItem, "MessageID") %
">Edit</a></font></td>

</tr>

That's part of the itemtemplate of my datgrid. I want the BlogID and theMessageID parameters to be added to the querystring of the hyperlink, whiledatabinding. But it shows an error. It does not allow me to switch to thedesign view. It also causes compilation error.

I ultimately want to get something like:
<a href=edit.aspx?blogid=2&msgid=3>Edit</a>in the <td> tag

How can I correct it?

Thanks
SeeSharp
.

Nov 17 '05 #2
Thanks so much Ivans! It helped :)

SeeSharp

"Ivan" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
in this case replace "" by ' !!

example :

<tr>
<td align="right"><font size="0"><a
href='edit.aspx?blogid=<%#
DataBinder.Eval(Container.DataItem, "BlogID")%>&msgid=<%#
DataBinder.Eval(Container.DataItem, "MessageID") %
'>Edit</a></font></td>


</tr>
-----Original Message-----
<tr>
<td><font size="0"><%# DataBinder.Eval

(Container.DataItem,
"PostedDate") %></font></td>
</tr>
<tr>
<td align="right"><font size="0"><a

href="edit.aspx?blogid=<%#
DataBinder.Eval(Container.DataItem, "BlogID")%>&msgid=<%#
DataBinder.Eval(Container.DataItem, "MessageID") %
">Edit</a></font></td>

</tr>

That's part of the itemtemplate of my datgrid. I want the

BlogID and the
MessageID parameters to be added to the querystring of

the hyperlink, while
databinding. But it shows an error. It does not allow me

to switch to the
design view. It also causes compilation error.

I ultimately want to get something like:
<a href=edit.aspx?blogid=2&msgid=3>Edit</a>in the <td> tag

How can I correct it?

Thanks
SeeSharp
.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Frnak McKenney | last post by:
I have a (small) multi-table database application which allows edits, print reports, and has two scrolling screen displays which show information merged from multiple tables. I'm having trouble...
2
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know...
7
by: Pete Davis | last post by:
A different question this time. I have a DataGrid bound to a collection. Is there any way for me to allow sorting? The DataGrid.AllowSorting=true doesn't work, but that's probably because it can't...
5
by: sdbranum | last post by:
I have been using Visual C#.NET to code a large project having many data adapters, data sets, datagrids, multiple forms with tab pages, each containing various controls (mostly label, text boxes,...
3
by: Richard | last post by:
I tried boolCol.ReadOnly = true and a bunch of other things but can't get the check boxes for the datagrid's column for all rows to be disabled? Can someone tell me how to do this? ...
5
by: John Richardson | last post by:
I've been bothered for some time about my DataGrid not populating my rows very quickly. I have about 10K rows loading into the grid. I create a datatable dt with 2 columns, an ID and a display. ...
4
by: spammy | last post by:
Hi all, Is it possible to create subheaders in datagrids? Or rather to add a parent header row to an existing datagrid? Currently my DG looks like this: NAME | A - PART1 | A - PART2 | A -...
2
by: rodchar | last post by:
hey all, i've got an asp.net page with a datagrid on it. when i delete all the rows in the datagrid it just shows the column headers. how are some ways i can clean that up? thanks, rodchar
6
by: shil | last post by:
Hi, I am writing a windows app in .net 2003. I have a datagrid which gets data from a storedprocedure. My question is how can I update the data in the datagrid? I want to call another...
1
by: ravikanth | last post by:
My doubt is How can we display the data of a particular row into a text box when we click on the edit linkbutton in the datagrid.... i would be very thankful to the people who ever can clarify this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.