I want to add alt="" to all hyperlinks on page load. I have many many hyperlinks (both master & content and programic & coded) and I don't want to do Add.Attrubute() to each hyperlink. Is there a way to do this similar to the javascript getElementsByTagName concept?
I created a simple Master Page in Visual Studio 2008:
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
and got green underlined 'Master' with two warning messages: 1.Validation (ASP.NET): This attribute name must be followed byan equal (=) sign and a value. If the value is in quotation marks, the quotation marks must match. 2. Validation (ASP.NET): Attribute 'Master' is not a valid attribute of element 'Control'.How I can get rid of the messages?
I use a multi-line textbox for users to post their words, for security I use html.encode to disable html tags, however I do want to detect links and email using regular expression so users can click on them, however, that is not gonna work as I disable the html tag, I wonder what is the most common way to deal with this kind of issue?
I've a WebForm with a HTML table and I need to add hyperlinks in a column. The amount of hyperlinks depend on the rows in a table.Can someone tell me how can I do that?
I want to make some hyperlinks with images but when its clicked=when its on the page it represents it makes the image different. I know about the mouseover when you pass over them with the mouse but I DIDNT MEAN THAT. Just to be clear only changes image when its clicked=when its on the page that it represents.
I am a complete noob to ASP.NET (C# based) and have migrated from PHP (I have mentioned this a few times but I feel I have to 'cos some of the questions I ask seem so basic!)
I have page (Products.aspx) it has a grid view using products from the northwind DB, the grid view is paged to show 'n' products at a time and has an extra column which is basically a 'view this product' hyper link, the user can click on this link and is taken to another page (Product.aspx) which provides complete details for that particular product, so, this is what I want to do next, I want to add a button that takes the product ID, (or other unique property of the product - it doesnt really matter at the moment, but i am likely to stick to ID).
Then take that value and place it in a cookie, (I know that session variables are held in cookies, that is not really a problem at the moment, I am concentrating on basics, then I will go a little more advanced).
so, I have a button - call it productIdBtn, and its value, which is going to be the product ID, in the button on click handler, how would I add this value to a cookie - call it prodIdCookie?
I am having to re-learn everything from the ground up and because PHP is so simple to write (mainly because of its weak typing),
I was working on a fairly simple code to get RSS into gridview. The code works fine with the URL mentioned in code but unable to work on Commented one.
I am trying to get a hyperlink to show up in each field of the "Title" column in the gridview below, but it doesn't render as a hyperlink:
ID Title City State
115779 <a href=job_details.aspx?jobID=115779>Online Advertising Inventory / Yield Manager (773044)</a> Washington DC 115801 <a href=job_details.aspx?jobID=115801>Administrative Assistant (778554)</a> Washington DC 115840 <a href=job_details.aspx?jobID=115840>20769 Deal Leads</a> Washington DC
I am trying to disable and enable hyperlinks on an aspx page using a button from another aspx page. I have an idea of having two buttons on one page labelled "disable" and "enable". clicking disable should disable a particular link on another page and clicking enable should enable that same link.
I read a few VB books and ready or not, I going to start building!I am "very afraid" of code behind. Frankly, much of what I read about OOP went a bit over my head and am hoping by "doing" it will all come together. That said...
Datalist results. I want them to hyperlink to another page with a querystring. I moved a hyperlink control into the EDIT TEMPLATE box and removed the origianal label that was in the box. I did some editing and was able to come up with a hyperlink, but I really need a hyperlink to a new page with the original result of the datalist being the querystring parameter. For example...
If BABE RUTH is the datalist result, I want the querystring to be www.mysite.com?athlete=BABE%20RUTH. I am fairly competant in asp classic. I feel like a guy who has amnesia and has to learn the most basic stuff from scratch.
Does the ASP.NET SiteMapPath control work when using redirects or hyperlinks? It seems the only time it's working for me is if I access a page through the asp.net menu control.
i'm trying to host an .net framework4.0 application in IIS7. i got an error while clicking on the manage module in modules .like ("Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive. ") .I changed my application poll to .net4.0.I am able to browse my application
I installed Microsoft Visual Studio 2010 Ultimate Trial and converted existing asp.net 2.0 web application and I am getting this error: znrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive. It's coming from this section in the web.config which was auto-generated by VS2010 when I converted the project:
I am developing asp.net mobile application. I am using LINQ to XML to query XML file. I am using the following query to retrieve the name & value of the query dynamically as follows
var TotalManifolds = from MF in FieldRoot.Element("FIELD-DEFINITION").Element("MANIFOLDS").Elements("MANIFOLD") join SLT in FieldRoot.Element("FIELD-DEFINITION").Element("SLOTS").Elements("SLOT") on (string)MF.Attribute("MID") equals (string)SLT.Attribute("PARENT") select new { SlotName = (string)SLT.Attribute("NAME").Value, SlotValue = (string)SLT.Attribute("NAME").Value };
In the following statement of above query I want to retrive the name of the attribure dynamically without explicitly specifying the name of the attribute SlotName = (string)SLT.Attribute("NAME").Value Here I am explicitly specifying the name. I want to code which can dynamically retrieve the name of the attribute. I am new to Linq to xml. how this can be done programatically? or can you provide me the link through which I can resolve the above issue ?
I created a datalist which contains hyperlinks that when clicked will redraw the page and update my another datalist in the same page. How do I hide this datalist after click any of its hyperlinks?
I have a gridview with a hyperlink control that allows the user to save pages to it (www.google.ca, asp.net, etc). Unfortunately it always adds the server name to the beginning of their link. [URL] I was wondering is there any way to change that within the control. or should I have it pass a query string to a url handler that will response.redirect them to their actual page?
In the following code i have to continuing showing the rows of the gridview as links. For example: the user will click on a customer and will see more detailed information.
protected void Button1_Click(object sender, EventArgs e) { //List<Customer> customersresult = new List<Customer>(); does not match the type here CustomerWebServiceClient.Customer[] cust; CustomerWebServiceClient.CustomerWebService client = new CustomerWebServiceClient.CustomerWebService(); cust = client.GetCustomerContract(TextBox1.Text); //coming across now.. //if (cust.va) validate if there is data GridView1.DataSource = cust; GridView1.DataBind(); } // this is showing the gridview with the data coming. What would be next steps to show the rows as hyperlinks.
I need a GridView with 6 columns, one of which ("ItemID") is a HyperLink who's URL and text is determined from the C# code as I will get that data from an SQL database
INITIALLY, what I wanted to do, which would have been easy as pie, is:
[Code]....
HOWEVER, this does not work because every row in the Item ID column is filled with "System.Web.UI.WebControls.HyperLink". Apparently, this is what the HyperLink's toString() method returns. Apparently, you can't just throw a HyperLink into a DataRow and call it a day. I need to know how to make this ItemID column into such a HyperLink. It doesn't necessarily HAVE to be a HyperLink control, it just has to be able to call my javascript function on the aspx page, "popUp(URL)"
To give you a visualization of what I'm trying to achieve: this is a change log for an inventory system. The ItemID column indicates what item was altered. However, simply just having a number there doesn't say much, so I'm trying to create a link with the text, for example, "42 (motherboard x)". In other words reader["ItemID"] + " (" + reader["Description"] + ")", and that link will run a javascript function I have called popUp(URL) which takes a URL and opens it in a new window of specific size and location, to view that item's details.
I've tried various other methods such as disabling AutoGenerateColumns and manually create a HyperLinkField, but to no avail, because I couldn't get it to run my javascript function that way.