Click here to Skip to main content
15,887,464 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi Team

I have a working div card, but i want my folder to a specific routing url for a page, but i cant seem to find any similar examples,any mates can help me on this. Meaning what i want is when the folder is clicked it must route to a page, thanks.

What I have tried:

<center>
                                  <div class="card" style="width: 18rem;">
                                      <div class="jump-response"></div>
                                      <div class="card-body d-flex flex-1">
                                          <a href="#" class="btn btn-primary pull-left">Published</a>
                                      </div>

                                      <div class="card-body d-flex flex-center">
                                          <a href="@Url.Action("Modules","Home")" class="card-link pull-left">Me</a>
                                          <hr/>
                                          <img class="card-img-bottom" src="~/Images/folders/folder-icon.png"  style="max-width:32px;">

                                      </div>
                                  </div>

                              </center>
HTML

Posted
Comments
F-ES Sitecore 9-Sep-20 7:19am    
If you want something to go to a page when you click it then put an <a> tag around it.
gcogco10 9-Sep-20 7:21am    
F-ES Site i was thinking if i put onclick="Url.Action("Files", "Home")". is this a bad approach? Need some examples at least then can work accordingly.
F-ES Sitecore 9-Sep-20 9:00am    
It's a bad approach because it won't work :) It will also give the user no indication that they can click the element to navigate. If you use an "a" tag the browser will show the appropriate cursor and the destination will be shown in the status bar as per user's expectations.
gcogco10 9-Sep-20 9:03am    
I have tried this logic, ok what i want to achieve when the folder is clicked it routes there hope make sense, please share your thoughts.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900