I know this was a while ago but in order to style any element you need to use CSS, you can either create a style sheet or place the CSS code within HTML tags. I will put a link below explaining the ins and outs of CSS but let's say you want to change text colour within your H1 you would put: h1{ color:blue; } that will change the text colour of all your h1 to a dark blue, it is really simple. www.w3schools.com/css/default.asp
Mad respect for this tutorial! Is there a way to give each table row values a tag, such as hotels or restaurants, and on the hotels table only populate with values of hotels tags and so on? Thanks for this video!
Hi Eric, thank you for your comment. you can use data attributes to do that. here is more details: www.sitepoint.com/how-why-use-html5-custom-data-attributes/
@@1BestCsharpblog Thank you very much for taking the time to send me this, I really appreciate it. I hate to ask another question, but if you have time to send me in the right direction for this it would be so great. I want to make each row clickable with unique links. Ive found out how to do this straight in the html table but not when trying to populate the rows from data in an array. Either way, thank you very much for your time and have a great day! :)
@@carlblanchet You want to add an onClick function to each row/cell in that case. stackoverflow.com/a/21033433 This answer shows how you can do it. Of course, you have to change the function being called as well. I'd also send the array index as a parameter so you know which array data is being accessed. I imagine that it's a bit too late now, but I'm answering in case others have the same question.
The first method is absolutely awful (for the most part) and the second one is way superior. Any benefit that the first one might have is thrown out the window by the second.
If you can't read and comprehend this code, I think you're going to have a bad time doing just about anything. This is almost as easy as it gets. I imagine you've either given up or gotten significantly better by now though.
Just 1 word Brilliant.
Thank you so much, sir!! Great video
thanks so much your a life saver!
how would you handle if you want style on a specific with method 2
thanks for the amazing video sir
10000000000000000000000 thanks.
actually genuinely helfpful, method 1 seems really bad tho imo
good example !
This actually helped thick skulled me! Only thing is, how do i add style elements like ? Or different colors?
I know this was a while ago but in order to style any element you need to use CSS, you can either create a style sheet or place the CSS code within HTML tags. I will put a link below explaining the ins and outs of CSS but let's say you want to change text colour within your H1 you would put:
h1{
color:blue;
}
that will change the text colour of all your h1 to a dark blue, it is really simple.
www.w3schools.com/css/default.asp
thanks u are the best
Question for you. How would you do this, but when using an external js file?
since you've been waiting this long ill tell you:
*you dont need to do nothing...*
How did you learn this method?
Mad respect for this tutorial! Is there a way to give each table row values a tag, such as hotels or restaurants, and on the hotels table only populate with values of hotels tags and so on? Thanks for this video!
Hi Eric, thank you for your comment.
you can use data attributes to do that.
here is more details: www.sitepoint.com/how-why-use-html5-custom-data-attributes/
@@1BestCsharpblog Thank you very much for taking the time to send me this, I really appreciate it. I hate to ask another question, but if you have time to send me in the right direction for this it would be so great. I want to make each row clickable with unique links. Ive found out how to do this straight in the html table but not when trying to populate the rows from data in an array. Either way, thank you very much for your time and have a great day! :)
@@carlblanchet You want to add an onClick function to each row/cell in that case.
stackoverflow.com/a/21033433
This answer shows how you can do it. Of course, you have to change the function being called as well.
I'd also send the array index as a parameter so you know which array data is being accessed.
I imagine that it's a bit too late now, but I'm answering in case others have the same question.
when debugging it... when started for loop ... rows is not identified... null value
sir i want to add next and previous button so that we can see one record at a time.so please guide how can i done this
The first method is absolutely awful (for the most part) and the second one is way superior.
Any benefit that the first one might have is thrown out the window by the second.
When I run the code it says missing semi colon at the end of the first line of the array which makes no sense?!
Sir can you tell me how to converr whole html datatable into json and get thes values in webstatic method in c# and fill into datatable
Thank you
Thanks a lot!
Good to U.
Hi Elameen
No talking
Good day Nigel
If you can't read and comprehend this code, I think you're going to have a bad time doing just about anything. This is almost as easy as it gets.
I imagine you've either given up or gotten significantly better by now though.
Thank you!