473,386 Members | 1,867 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.

Using HyperlinkColumn!

Hi all,
I have this big problem with hyperlinks I would appriciate any help please.
My web site has two datagrids on the same page. And one has a list of names of the users which are in a HyperlinkColumn. The second datagrid is for inserting data, and when a user inserts data I used 'Windows Authentication' for names in one column called Name.
Now this is how it's supposed to work: When any user want to see data about a particular user it's a matter of selecting his name and the data Writen by the selected user should be the only ones to be shown.
I got some examples on Google but they all seem not to be working. When a user is selected the URL changes instead of the particular rows in the datagrid to be selected. For example the original url is "http://localhost/Dash_Board/DashBoard.aspx" and if I select user Claude the URL change into "http://localhost/Dash_Board/Claude" and get an error The page cannot be found. Why would this be happening?
My code looks like this:
HTML part:
<Columns>
<asp:HyperLinkColumn Target="_self" DataNavigateUrlField="TeamBilling" DataTextField="TeamBilling" HeaderText="Billing" DataTextFormatString="{0:c}"></asp:HyperLinkColumn>
</Columns>
and code behind:
private void dgbilling_SelectedIndexChanged(object sender, System.EventArgs e)
{
SqlCommand myCommand = new SqlCommand("select * from dbo.DashBoard where Name = @Billing",con);
SqlParameter myparam = new SqlParameter("@Billing",SqlDbType.Text);
myparam.Value="../Dash_Board/DashBoard.aspx?,Name{0}";
myCommand.Parameters.Add(myparam);
SqlDataAdapter myAdapter=new SqlDataAdapter(myCommand);
DataSet ds = new DataSet();
myAdapter.Fill(ds);
dgis.DataSource=ds;
dgis.EditItemIndex = -1;
dgis.DataBind();
}
dgis: this is the datagrid that where user inserts data.
dgbilling: this is the hyperlinkcolumn.
Thanks.
May 11 '07 #1
0 1269

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jongmin | last post by:
Hi! I am making HyperLinkColumn in datagrid. It is simple to make the hyerlinkcolumn with one datafield. <asp:HyperLinkColumn Text="NAME" DataNavigateUrlField="NAME"...
1
by: Dmitri Manushin | last post by:
Hi all, i have HyperLinkColumn in DataGrid <asp:HyperLinkColumn DataNavigateUrlField="PostID" DataNavigateUrlFormatString="http://localhost/forum/posts.aspx?id={0}" DataTextField="Subject"...
3
by: SStory | last post by:
I have a style sheet for my site. It has various classes in it. It has <A: styles defined for all anchor tags. I have a datagrid in ASP.NET with a stylesheet linked to the page. It defines...
4
by: rcoco | last post by:
Hi all, I have this big problem with hyperlinks I would appriciate any help please. My web site has two datagrids on the same page. And one has a list of names of the users which are in a...
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: 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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.