|
Nathan Minier wrote: if a fresh face is not intimidated by the depth and breadth of knowledge needed to be a real developer, then they should do it and do it right.
Hi,
No need to apologise: please note that I never advised the OP to use WebForms - it's a matter of how far down the programming path one wants to go.
By the way, ASP.NET WebForms was created to differentiate between presentation (HTML) and logic (ASP.NET) as opposed to blurring them together (like in ASP and PHP), which it still does well. Quite many member portals (for example) have been written using WebForms, at a time when PHP was a competitor. I agree that WebForms is less adequate for a Web 2.0 scenario, but it's much easier to learn than MVC.NET for example, so once again, I think we are in agreement.
Skipping out on SQL? No, I dont think so...
So sure, if one wants to dig deep into coding, then he or she should by all means explore ASP.NET MVC, some advanced PHP, and many several newer and perhaps more exciting languages. It all depends on what one tries to achieve, and where in the path from design to code one wants to place oneself. As you said, the route you are suggesting "isn't for everyone", and Scott Gunthrie himself said some time ago that WebForms and MVC.NET are for different people but both have their merits (or something along those lines). I for one live happily with both approaches.
modified 31-Aug-16 19:55pm.
|
|
|
|
|
petter2012 wrote: Skipping out on SQL? No, I dont think so...
Well, one can dream.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
You should know how to handle problems, most of the companies want developers who can found solutions of a problem in the most efficient way,
for example you can write "hello world" 10 times or you can use a loop
that are the traits which a good developer should possess.
Now to become a web developer you should know.
1-HTML
2-CSS
3-one client side language
4-one Server side language
|
|
|
|
|
I am storing html string formatted in database. Now I want that string to be shown formatted but it's putting string as it is with tags. This is in C#. Good answer is appriciated
|
|
|
|
|
It depends how you display it. If you put it into a simple Textbox then it will be treated as such. If you want to display it formatted then you need to display it in a control that understands HTML.
|
|
|
|
|
You need to think about what it is you're working with. The contents of your database record is just simple text. There's no reason, when displaying it, that it will be anything but exactly what is stored.
If, on the other hand, that text is opened in a web browser (IE, FireFox, Chrome, etc.) then it will interpret the text (that is what browsers do) and display it with the context that you want. The browser does have to consider the text is coming from a website and isn't just a simple file that happens to have HTML in it by accident. It, too, will then just show the text.
As a hint, the text will have to be part of a web page that the browser can open or opened within a webpage that's already on the browser.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
You can use the HttpUtility.HtmlEncode method:
var htmlString = HttpUtility.HtmlEncode(user.Company);
It's a method called HtmlEncode in the HtmlUtility class which takes a string parameter and encodes it into a Html-safe string.
modified 5-Jan-17 10:54am.
|
|
|
|
|
we're loading all partials views to a common div.
$(divname).load(url);
on clicking a row in a table or clicking on an icon,or clicking on link, view changes. my requirement is, in a partial view, we have two text boxes which are free type. before this view clears, i need to save these data to db. what appropriate event is to be used before this view goes? i tried
$(document).unload
$(document).unbind
$(div).change
$(div).unload
etc. nothing worked.
please help me to resolve this issue
modified 11-Aug-16 5:46am.
|
|
|
|
|
Write a little intermediary function and call your div updates using it
var loadPartial = function(target, url, asyncPromise){
if(asyncPromise){
asyncPromise().done(function(){target.load(url)});
}else{
target.load(url);
}
}
You can then update your values via AJAX safely before the div is loaded, or not pass a callback if that's not appropriate for a particular navigation. Using $(button).click for the save of ease, I don't know what your navigation event looks like.
$(button).click(function(){
loadPartial($(div),this.url,$.ajax({.../update your database/}));
});
It's not the prettiest thing, but it's flexible.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
modified 11-Aug-16 8:32am.
|
|
|
|
|
I am trying to add background color to my page, and padding the paragraphs, and divisions. But its not working. I would appreciate it if you could go through the code and explain whats wrong. Any tips on how I should do it, or what I can learn from or follow will be appreciated too. Thanks
<!DOCTYPE html>
<html>
<head>
<title>Jake's Coffee Shop</title>
<meta charset="utf-8">
<style>
<! CSS For Menu >
ul {
list-style-type: none;
margin: 0;
padding: 0;
width: 50px;
background-color: #f1f1f1;
}
body{background-color: black;}
#UnorderedList li
{
display:inline-block;
}
li a {
display: block;
color: #000;
padding: 8px 16px;
text-decoration: none;
}
li a:hover
{
background-color: #555;
color: navajowhite;
}
</style>
</head>
<body>
<h1>Jake's Coffee Shop</h1>
<div id ="MenuBar">
<ul id = "UnorderedList">
<li> <a href= "https://www.google.com" > Home </a> </li>
<li> <a href= "https://www.yahoo.com" > Menu </a> </li>
<li> <a href= "https://www.music.com.bd" > Music </a> </li>
<li> <a href= "https://www.google.com" > Jobs </a> </li>
</ul>
</div>
<div id = "content">
<p><div>Come In And Experience...</div>
<br>
<div><img src="images.jpeg" alt="Heartmelting Coffee Picture"></div>
<br>
<ul id="ItemMenu">
<li>Specialty Coffee And Tea</li>
<li>Freshly Made Sandwiches</li>
<li>Bagels, Muffins, And Organic Snacks</li>
<li>Music And Poetry Readings</li>
<li>Open Mic Nights</li>
<li>...</li>
</ul>
</div> </p>
<footer>
<address>
23 Pine Road <br>
Nottingham, NGI 5YU <br>
0115 9324567 <br>
</address>
<p>Copyright © 2011 Jake's Coffee House</p>
<p><a href="mailto:ratul_shams@yahoo.com"> yahoo@ratul_shams.com </a></p>
</footer>
</body>
</html>
|
|
|
|
|
Your code works for me in Firefox and IE - although it's difficult to read black text on a black background!
ScarletMcLearn wrote: <! CSS For Menu >
That's not a valid construct, although most browsers will ignore it. If you were trying to write a comment, you need to use the correct syntax depending on the context:
<!--
<style>
body { background-color: black; color: white; }
</style>
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
As an ad-on to the previous comment.
I've often found a typo in a style statement ends the implementation of that particular style at that point. By type, I mean a real syntax error, such as ; instead of :. An unrecognized style isn't usually so serious.
for example, the following would be a problem:
<div style='color:#400;background-color;#888;text-shadow:2px 2px 0px #444;'></div> because of the semicolon after background-color. As this has some browser dependency on how the error is handled, partial style implementation is possible and often puzzling.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
I am confused which should I learn, Django/Python or NodeJS/ExpressJS. I am new to both of them. I am trying to create a back end for my android application but can't decide which language to choose.
|
|
|
|
|
So...Java then?
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
My vote is for Python! It's the best for start learning I guess!
|
|
|
|
|
That's a thing that I hear, and I sort of believe, because people tell me it is so.
The Android API is derived from Java, though, so I would think that would be a good focus point.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Why do we need [ChildActionOnly] attribute in MVC??
|
|
|
|
|
It prevents direct calls to a given method, such as direct navigation.
So if you only want a particular partial view or data object to be accessible by navigating inside your web app, you would use this. Otherwise the data or partial could be used by an external application making requests to your controllers.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Was the documentation[^] not clear?
A child action method renders inline HTML markup for part of a view instead of rendering a whole view.
Any method that is marked with ChildActionOnlyAttribute can be called only with the Action[^] or RenderAction[^] HTML extension methods.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
This not really a dev question but more of a user question. When I am on a web page, there are times I will click a link to read something. If it doesn't interest me, I'll hit the back button. Some of the time, I return immediately to the previous location. At other times, nothing happens. When I right mouse click on the go back button, I'll usually find 10-40+ items listed. I then have to go back a page at a time until I find my origin.
What technology is causing this?
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
That usually happens when the URL you've requested redirects you to another URL, using an HTTP 3xx status code. It tends to be most noticeable on sites that use "live.com" for authentication - the original URL redirects to a "live.com" URL, which redirects to another URL, which eventually redirects you to the page you want.
The other time you might see it is if the site is using the history API[^] within a single page.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Interesting. Would links to advertising do this as well?
Charlie Gilley
<italic>Stuck in a dysfunctional matrix from which I must escape...
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Possibly, if the link you click on goes to a handler that records the click and redirects you to the next URL.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
So I've been in hyperdrive learning ASP.NET MVC, Web API, CRUD operations, REST calls, Entity Framework, SQL, LINQ, jQuery, and more about unit testing and TDD, and I am now able to set up a database back-end and currently working with using web APIs to send JSON to be rendered client-side for a quicker user experience and less server resource usage...
My question is a lot of that stuff seems to be for significant size projects. What do web devs typically use to make a site that doesn't require a database platform? For example, I want to make a simple portfolio website with business information about me and some sample projects... I have no need for an account system, shopping cart, userbase, etc... I could even hard-code the page content frankly... Is there a benefit to using a MVC and database-backed system for such a site still or is that overkill? What technologies are typically used on simple (but modern, of course) websites? I'm thinking Bootstrap, HTML, and CSS at the very least but I'm not 100% sure what frameworks may be used.
Last but not least, what's the low-down on security in web development? I keep hearing people making comments telling other developers to use a CMS "for security reasons." But if we use other peoples' CMS, how will we learn to make our own CMS?
Thanks for your insight and I apologize for my ignorance, I only started coding this past May and am very happy to have learned this much but am at the stage now where I want to apply my knowledge above and beyond course exercises and assignments.
|
|
|
|
|
TheOnlyRealTodd wrote: use a CMS "for security reasons."
That's a new one on me.
A CMS is about making it easier to change the content of your site. By definition, that also makes it easier for hackers to change the content of your site.
You're exposing a bigger surface-area which has to be secured, which means learning how to use the CMS to secure it. You'll also need to keep on top of updates, so that you can install patches for any security vulnerabilities as soon as they're patched.
Hopefully, you'll pick a CMS which is free from basic security problems like SQL Injection, XSS, XSRF, etc., and which has an active development team to squash any bugs as they emerge.
You'll also need to be ready to jump ship if the CMS you choose is ever abandoned. Being stuck on a dead product is a great way to expose yourself to security vulnerabilities!
I guess there's more chance of bugs being discovered and fixed in a widely-used CMS than in a home-brew solution. But there's also more chance that those bugs will apply to multiple sites, making them high-value targets for hackers.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|