ASP dynamic data url? - javascript

I've been quite frustrated since I have been looking on google for an answer to my problem and nothing pops up, I am using dynamic data to create some forms on a asp.net website however on one field I want to be able to include a hyperlink to another page, is this possible ? if so any help would be greatly appreciated, thanks
Code
[ScaffoldColumn(true)]
[Display( Name = "1. Help Page Document", Order = 1)]
[ChoiceComment("No", "Yes")]
[ChoiceDisplayValues("No", "Yes")]
[ChoiceValues("2", "1")]
[RadioListOrientation(RadioListOrientation.EnumOrientation.Horizontal)]
[UIHint("RadioButtonList")]
so I want the text 'Help Page Document' to be a url like an anchor tag, is this possible? via javascript, c#, etc... thanks again.

There are many ways to achieve this.
One way is to change the field template that you currently use the this field or you can create a new one like EmailAddress.ascx below.
For an example, in your project, look at the content of : /DynamicData/FieldTemplates/ForeignKey.ascx
See also : https://goo.gl/7HZ4c6
To use this example, you will need to put the following annotation in your meta data :
[FilterUIHint("EmailAddress")]

Related

How to show content of section and display it when click menu

I write 4 sections pages in index html page and i want link the sections page with the menu.
How can I show the content of section when click at each menu?
I use ready website from bootstrap and edit it and I use atom program.
What i should to write at page html or at javascript?
Below is my code:
I concur with NewtoJS you should post a code snippet instead of an image, and you are asking at least 3 questions any way I will try to help
1.- I want link the sections page with the menu?
you can do so using The HTML < a> tag that defines a hyperlink, which is used to link from one page to another.
2.- how to show content of section when click at each menu?
this can have many different aproaches but since you tagged the question with html I will try to answer acordingly. Each section should have its own html file, or and "ID" if they are in the same page when you click on a < a> tag refering to that page or "ID" it will lead to that section.
3.- what i should to write at page html or at javascript ?
of course a web site can be done without using Javascript it is easy but you need to use CSS as well for styling purposes. Generally you can't choose just one, you have to use both and depending on your needs could be more from one than the other. please refer to this site for a complete documentation on HTML
and you can read about javascript here, if you want to learn CSS please refer to this page.
a side comment:
for a complete documentation on how to use html < a> tags please refer to this >site
I will suget not to use POOPSTRAP, and you should try to work with wordpress or something like that if you dont know how to code, and if you want to learn to code starting in stackoverflow is a bad aproach, you should first take a free course on udemy.

How to create a gallery page that can be used for multiple projects?

I will try to keep this short.
What am I making?
I want to create galleries for multiple projects. A gallery is opened as a new page by clicking on a project's thumbnail on the main page. Each gallery should have the same layout, just a different title, text and images.
How do I want to make it?
I could make multiple pages for each gallery, but I ideally want a single page of which the content is adjusted to the corresponding project. This should make it easy to adjust the layout for every gallery and add more galleries in the future.
I was thinking of something like this:
index.html
$project1Title = "Project 1";
$project2Title = "Project 2";
Project1Thumbnail
(Clicking this should: gallery.html>$projectTitle=$project1Title, etc.)
Project2Thumbnail
(Clicking this should: gallery.html>$projectTitle=$project2Title, etc.)
gallery.html
<h1>$projectTitle</h1>
<h2>$projectText</h2>
<ul>$projectImages</ul>
I know I didn't use correct syntaxes, it is just a simple example.
What did I try?
I tried to use php and javascript to pass variables from the main page to the gallery page, but my knowledge with these languages is not very sufficient.
So...
What are your suggestions on how to go about this? Creating multiple pages that take the layout from a single css file, creating a single page that takes the content from variables, or something else?
I hope everything is clear, please let me know if it is not.
Thanks in advance!
the easiest way is to maximize the use of your database by storing gallery details and retrieving it using sql queries and eventually displaying it on your dynamic page (gallery). Generally database can store different kinds of data with different kinds of format such as file path.
instead of passing "$project1Title = "Project 1";" title use a proper variable that can be used by your database such as id.

Get current location/url of iframe and assign into a variable

I have some content hosted on my own servers which I'm displaying to the user dynamically. However the content is a few layers deep and I need the url/location of the iframe so I can assign it to a link.
The result should be when a user clicks on the link, it takes them to the page with the iframe as well as displaying the proper page/layer within the iframe.
How do I achieve this via javascript or jquery? Or is xpath also required for this? If you disagree, please don't downvote this question but explain why I shouldn't post it since too many downvotes and you get banned.
Thanks!
Try to use jquery for this, like:
$(document).ready(function(){
$("#iframeid").load(function(){
alert(this.contentWindow.location);// do what you want with this location
});
});
Note: First add a latest version of jquery

dynamically changing html text before loading- possible?

I have many flow charts and clicking on each block of a flow chart must open a question. Basically the question page has the same template with just a change in the heading. Now I think it would be absurd to create a html file for each question since the template is going to remain exactly the same. Once the user clicks on a block of the flow chart, is there a way to change the heading of the question page and then load it?
I want to use jquery to do it and I am just a beginner in jquery. I know how to change texts by appending/replacing elements once the page has been displayed or loaded.
You could replace it each time on the fly:
var template = "{header}<p>Some text</p>";
$('#output').append(template.replace('{header}', 'Some header'));
$('#output').append(template.replace('{header}', 'New header'));
You can try it here: http://jsfiddle.net/ykmtF/

Google "Sitelinks" for a website with almost only dynamic content?

I have a classifieds website, and the index.html is just going to be a simle form, which uses javascript alot to populate drop lists etc...
I have a menu also, put into a div container, but is this enough?
I mean, I have no content in index.html (almost), but a search form, which submits to a search results page, where all the content is.
So I am worried google might not find suitable sitelinks for my site?
Anybody know if I need to add something to the links in the index.html, which google might use for sitelinks? title tags etc...?
Thanks
Instead of changing your site around you can just create a good sitemap.xml file. That is of course if you're using GET for transferring data to your processing page. I would create a dynamic sitemap.xml page that is based on the form data that your processing page can read.
http://sitemaps.org/
http://www.smart-it-consulting.com/article.htm?node=133&page=37

Categories