Encode xPath as link - asp.net

I am encoding the link contained in a RSS in this way:
<div class="link">
<span> <%# System.Web.HttpUtility.HtmlEncode(XPath("link").ToString())%> </span>
</div>
the above is returning the link of such rss in text format, for example like this:
http://feedproxy.google.com/~r/EuropeanRailwayReview/~3/0pxP3t3rge8/
but as text not as clickable link.
Is there a way to get it returned as a hyperlink that can be clicked to navigate to the relevant address? Or, even better as something to click without showing the url?

Try this:
<div class="link">
<span> <%# System.Web.HttpUtility.HtmlEncode(XPath("link").ToString())%> </span>
</div>
Or this:
<div class="link">
<span> Link to Article </span>
</div>

Related

How to link a button inside of a linked article?

I know that you can't put a link inside a link, but how would link a button inside of an already linked ? I'm trying to recreate the aside on the pcfinancial website.
Here is what I did which I know is incorrect:
<a href="https://www.pcfinancial.ca/en/learning-hub/blog/introducing-the-new-pc-money-account/" target="_blank" title="Link to Article">
<article>
<img src="images/first-article.png" alt="Introducing the new PC Money Account">
<p>Financial Fluency</p>
<h3>Introducing the new PC Money™ Account</h3>
<p>By PC Financial Team</p>
<p>Read Article</p>
</article>
</a>
Now how does one get the button for "Financial Fluency" that is linked in the article like it is on this website: https://www.pcfinancial.ca/en/
I'm in a coding course and had to recreate this in HTML. We have not begun CSS yet.
Thank you.
Try to remove link on a top of <article> link and put its on your <img> <h3> and <p> tags like this:
<article>
<a href="https://www.pcfinancial.ca/en/learning-hub/blog/introducing-the-new-pc-money-account/" target="_blank" title="Link to Article">
<img src="images/first-article.png" alt="Introducing the new PC Money Account">
<p>Financial Fluency</p>
<h3>Introducing the new PC Money™ Account</h3>
<p>By PC Financial Team</p>
</a>
<a href="YOUR_LINK_HERE">
<p>Read Article</p> <!-- and use <button> element if you think it is a button-->
</a>
</article>

How to link this button to another page

https://jsbin.com/jaboyeleta/edit?html,css,output
<div class="sub-main">
<button class="button-two"><span>Hover Me</span></button>
</div>
Im pretty newsih at this, and i need help knowing where to place the
snippet of code to link this button to my site, any help? Sorry if this is a silly question to ask here. I tried to find videos.
Try this:
<div class="sub-main">
<a href="https://google.com">
<button class="button-two"><span>Hover Me</span></button>
</a>
</div>
Maybe you can read more about links and another HTML stuff here
Wrap the button in an a tag like so:
<div class="sub-main">
<a href='https://www.google.com'>
<button class="button-two"><span>Hover Me</span></button>
</a>
</div>

How to hide urls of hyperlink in outlook?

I am sending mail through my emailer and in my email i am sending an image with the background hyperlink, the email showing normal but in system configured outlook showing the link of URL of the hyperlink.
Please visit below mention URL
https://prnt.sc/itb5wq
I am trying to hide URL using placing span or p tag before hyperlink.
Source code:
<span style="color:#ffffff;">Text Something</span>
<a href="#" id="m-banner-anchor">
I tried this code and worked for me perfectly:
<span style="opacity:0"><font color="white" size="1">Text Here</font></span><br><br>
<a href="#" id="m-banner-anchor">
<img src="images/cengage_promo_header.jpg" id="m-banner-image" height="184" width="755" />
</a>
Your approach was not that bad, here's the correct syntax for a HTML hyperlink:
I am a link and you can't see my destination!
Or in your case:
<span style="color: #fffff">Text Something</span>
Put your span in your hyperlink ...
<span style="color:#ffffff;">Please Visit</span>

How to use preceding-sibling?

<div id="ResultPanel" class="panel-body table-responsive">
::before
<div id="ResultLoader" class=""></div>
<h4 id="screenName">
TestScreen
<small>
first
</small>
</h4>
</div>
I want to get the text from <h4> tag only, not along with the <small> tag text. When I am trying to get xpath of <h4> tag, it shows text as "TestScreen first". I am using
//*[#id='ResultPanel']/descendant::h4[#id='screenName']
You can use the following locator:
//*[#id='ResultPanel']/descendant::h4[#id='screenName']/text()[1]
I have tested it in Chrome Developer Tools is working like a charm.

Html is being truncated on save in drupal (full html)

If I unput a certain piece html into my page, it seems to be truncating:
<div id="slideshow">
<img style="cursor: pointer;" src="files:img/slideshow/3.png" id="left_slide" alt=""/>
<img style="cursor: pointer;" src="files:img/slideshow/1.png" id="center_slide" alt=""/>
<img style="cursor: pointer;" src="files:img/slideshow/2.png" id="right_slide" alt=""/>
</div>
It all looks good in the preview, but when I save it it becomes:
<div id="slideshow">
<img style="cursor: pointer;" src="http://local.drupal.com/sites/default/files/img/slideshow/3.png" id="left_slide" alt="" />
</div>
I'm at a loss! I'm not using any nasty WYSIWYG editors and the input format is full html. The second code example indicates that I'm using the path filter module but I've also tried disabling that and resaving. It still truncates.
I'm using Drupal 6.19.
You certainly print the teaser only.
To publish to the front page the complete node Go to Administer > Content Management > Post Settings > Choose 'unlimited' from the 'length of trimmed post' select box.
You can also manually controlling the teaser break point by inserting:
<!--break-->
If you use a views you can control if you want to show the complete node or the teaser in the settings of the view.

Resources