How to generate action link title? [closed] - asp.net-mvc-3

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm new to mvc3. I created one web project though mvc3 . On Index page of my Customer model, i added following code which is generating the result as follows-
<span class="callSapn">#if (item.Calls.Count != 0)
{
#Html.Label("Calls(");
#Html.DisplayFor(modelItem => item.Calls.Count);
#Html.Label(")");
}</span>
I want to give Html.ActionLink to whole span, means the span generated result will be the title for Actionlink.
How to do this?

If you want to make the span element to a clickable hyperlink, you can try this
<a href="#Url.Action("YourActionName")" >
<span class="callSapn">Your span content goes here</span>
</a>

#Html.ActionLink(string.Format("Calls({0})", item.Calls.Count), "action_name")
If the action is in the current controller. Otherwise all the other overloads accept link text: http://msdn.microsoft.com/en-us/library/dd505040

Related

In mvc3 how to access the div inner text of view in controller? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I have one Div ,that is editable.when i edit the div after click one button how to access div inner text in controller...In Controller Request[""]...is possible??
It's hard to understand your question correctly, but if you are trying to process contents of a div in controller, ajax will be your best friend. You can use e.g. jQuery to load the changed div content and then make a post to your controller's action that will process it.
No this is not possible as a <div> element is not an input element that has a value posted back to the server when a <form> element is submitted. You could
Use a <textarea> or <input type="text"/> instead of a <div>
Use JavaScript on the client side to get the innertext of the <div> and include the value in the values submitted to the server.
Personally, I'd go for option 1 and simply put a <textarea> inside of the "editable" <div>

Pinterest pinit button is not getting count [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have added a pinit button, but it is not getting the count.
<a data-pin-config="beside" always-show-count="true" data-pin-do="buttonBookmark" href="//pinterest.com/pin/create/button/"><img src="//assets.pinterest.com/images/PinExt.png" /></a>
<script src="//assets.pinterest.com/js/pinit.js"></script>
I hope you did this on purpose, but just to be sure:
Your href=//pinterest.com/pin/create/button/ link is missing the ?url=http://your_url_here portion. How would pinterest know what page you want to link to (and get the count for)?
Check out the pinit generator on this page: http://business.pinterest.com/widget-builder/#do_pin_it_button
The correct version looks more like this:
<a data-pin-config="beside"
href="//pinterest.com/pin/create/button/?url=http%3A%2F%2Fwww.flickr.com%2Fphotos%2Fkentbrew%2F6851755809%2F&media=http%3A%2F%2Ft1.gstatic.com%2Fimages%3Fq%3Dtbn%3AANd9GcS6QBH2vJzx6BnYN_CACYuThsx4jL6MILcVHfFg6n-CX3CD5rq7ow&description=Next%20stop%3A%20Pinterest"
data-pin-do="buttonPin" >
<img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" />
</a>
If I leave out the ?url en ?media variables my pin'it! button doesn't work either :).

Place page title over image [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to place an image at the top of the content <div> tag in a custom Joomla site, then place the page title over the top of the image. The site is currently being developed locally so I don't have any links sorry. The rest of the site is coming along pretty smoothly, any help with this will be greatly appreciated.
I think you are making this harder than it needs to be. First, you can add the image in the header by simply adding a module position (if there isn't one already) within your header div. Next, I am assuming you are talking about the title of a Joomla article. This can easily be displayed in the component area then moved using CSS. You already gave a container div (content). As long as you don't specify the position attribute of the divs between content and your page title, you will be able to position your title absolutely anywhere within the content div, including over the top of the image you added to the header in a module.
You will have to make changes to your index.php of your template.
Add a div above the <div class="container"> then you can make a db call using JFactory::getDBO() and fetch data you want and show it in the div.
<div class="page-name"></div>
<div class="custom_div"></div>
<div class="content"></div>
<!-- rest of the index.php divs goes here -->
if you want the specific div only in the front page, use the below code.
<?php
$app = JFactory::getApplication();
$menu = $app->getMenu();
if ($menu->getActive() == $menu->getDefault()) {
echo '<div></div>';
}
?>

magento how to add on sale stamp image on a product [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
How do we add a On Sale image to a product and display it on the product details page along wiht the category page?
Im using he following code for adding On Sale image in the category list page, and it gets me the desired result.
<?php $specialprice = Mage::getModel('catalog/product')->load($_product->getId())->getSpecialPrice();
if ($specialprice){?> <img src="<?php echo $this->getSkinUrl('images/onsale-img.png') ?>" width="68" height="68" class="onsaleicon" />
<?php } ?>
But im unable to get the same icon to continue onto the PRODUCT details page...
Any suggestions how i can make this happen...
Try this,
$_product->getSpecialPrice();
catalog/product/view.phtml
If you are intrested in commercial check this extension

Menu with Image in Joomla [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Hy!!
I am new to joomla. I have to rebuild http://www.bern.ch/weiche_de for school.
I want to build the menu like this:
My actuall Menu looks like:
Please help!
Before you do anything, at all, go read the faq, then read everything you can find at w3schools. Last, but NOT least, learn to use proper spelling and punctuation.
Having said that, here's something hacked together that probably won't work as you want:
<div id="container">
<div class="logo">
<img src="127.0.0.1/myimage.image" alt="Nothing." />
</div>
<div class="menu">
<ul>
<li>Stadtverwaltung</li>
<li>Gemeinderat</li>
<!-- Fill in the rest here -->
</ul>
</div>
</div>
then, in your *.css-file, do something like this:
.logo {
float: left;
}
.menu {
float: right;
}

Resources