-
I want your FAQs for the ASP.NET forum
I think this forum should have a FAQ list. Just a bunch of small questions that are often asked. I know that ASP.NET is vast and it might be hard to come up with questions that are frequently asked, but it's worth a try. If we come up with a good number of questions and answers, then I will make a separate thread with the questions and answers that I pick. Remember that something that may be frequent to you isn't frequent to everyone. Once I make the FAQ thread, I will send you a fish head in the mail. Feel free to post whatever you think if a frequent question in this thread.
-
Re: I want your FAQs for the ASP.NET forum
It can also be FMPs. Frequently Mentioned Points. For example, the use of MsgBoxes is prevalent but not a good idea. It's been 10 seconds since I posted, where are the damn questions??
-
Re: I want your FAQs for the ASP.NET forum
Hey,
Just a few ideas:
- Where can I find the Connection Strings to use for my Database - http://www.connectionstrings.com/
- Should I use parameters for my queries - yes
- Should I use Response.Write for debugging - no
- What is the best way to test/alter the styling of my page - Firebug
Will have a think about some more.
Gary
-
Re: I want your FAQs for the ASP.NET forum
* Adding an AJAX reference to your project in VS 2008.
* Adding an AJAX.............................. in VS 2005
-
Re: I want your FAQs for the ASP.NET forum
Another couple thoughts:
- How do I add logging to my application - log4net
- How do I separate the logical sections of my website - presentation, business layer, data access layer, stored procedures
- How do I encrypt the connection string section of my web.config file
- How do I add XML Comments to my code - /// (not really specific to ASP.Net :))
- Why would I add XML Comment to my code
- How do I connect to a MySql Database - MySql Connector for .Net
Gary
-
Re: I want your FAQs for the ASP.NET forum
- How do I use Debug.Trace for debugging?
- Where do the message I write appear? - Output Window
- What is trace.axd and how do I use it?
-
Re: I want your FAQs for the ASP.NET forum
From my side
1.How to read the data from webpages.
2.What is Connection Pooling. How it works.
3.What is Http Modules and Handlers
4.GridView Events and methods
and..
-
Re: I want your FAQs for the ASP.NET forum
1- View state
2- Session state
-
Re: I want your FAQs for the ASP.NET forum
some more:
- What is the ClientID of a control?
- Why do I need it?
- How can I get access to the ClientID in my javascript code?
-
Re: I want your FAQs for the ASP.NET forum
And some more..
1. How do display Sum of Column in a Gridview
2. Formating Gridview and Gridview Related FAQ's
-
Re: I want your FAQs for the ASP.NET forum
Oi, you lot. You have to answer some of these too you know! This is a group effort. :p
-
Re: I want your FAQs for the ASP.NET forum
Mendhak,
What is the plan for some of these then?
I am happy to write up something for them, but should I create CodeBank entries and then the FAQ can link off to them, or do you want the FAQ's answered in line?
Gary
-
Re: I want your FAQs for the ASP.NET forum
Create a post in this thread itself. I'll move the post from one thread to the other when the time comes.
-
Re: I want your FAQs for the ASP.NET forum
Okay dokay,
I will try and pick off a few from the lower hanging branches today, and then work on some of the other ones over the weekend.
Gary
-
Re: I want your FAQs for the ASP.NET forum
An alternative (if you think it is apt) is to post the items as threads in the FAQ forum - as we do for Database/Classic VB/Office
If you decide to do that, just use a thread prefix like [ASP.Net]
-
Re: I want your FAQs for the ASP.NET forum
Hey,
Are you referring to this forum:
http://www.vbforums.com/forumdisplay.php?f=73
If so, what are the "rules" for posting over there?
Are you suggesting we post the FAQ's in there, and then use a FAQ sticky in the ASP.Net forum as the "index" for these threads?
If that is the preferred approach, then I see no reason to not do this.
Gary
-
Re: I want your FAQs for the ASP.NET forum
That's the one. :)
You basically post a new thread as normal, but add the topic area as a prefix (so one I did was "Database - Why should I use Parameters instead of putting values into my SQL string?").
The FAQ forum is fully moderated, so your post will not be visible until the apt moderator (which would be :afrog: ) reads it... and you can use HTML in addition to forum tags if you like.
Whether or not that would be apt depends on what is intended - it may be that a single thread containing everything will be short enough, but I suspect that will grow too large eventually (like the one in the API forum did, and now takes ages to load).
-
Re: I want your FAQs for the ASP.NET forum
Hey,
Sounds like this could be a good idea to me, especially since some of the topics may take quite a bit of explaining.
What do you think Mend?
Also, when you say we are allowed to use html tags in the forum post, does that mean we can just type directly into the post with html tags, and this will then be moderated by someone? Do you have to be a power poster to get this, or can anyone do it?
Gary
-
Re: I want your FAQs for the ASP.NET forum
A few contributions from me too. Feel free to remove the ones you feel are not so common, or rephrase them if they do not fully describe the intended purpose :)
1. I put a MessageBox() or MsgBox() function inside my webpage. It compiles well but code behaves weird or errors out when run. Why?
MsgBox/MessageBox is a server-side function. It won't show on the client. However it should serves no purpose showing a message box on the server. So virtually this MsgBox is of no use. Moreover it will obstruct the server execution until OK is clicked. So it should never be used.
If you want to show a messagebox on the client side, you should use any scripting language like javascript/jscript, vbscript etc. which the client browser can understand. The javascript has become the standard now because almost all webbrowsers understand javascript.
This thread has a detailed discussion on this topic: http://www.vbforums.com/showthread.php?t=592138
2. What is the equivalent of ShowDialog() in ASP.Net?
There is no equivalent. ShowDialog is a concept that one would use in Windows Forms programming. In ASP.NET, there is a paradigm shift. Each page is an object in its own right, and it cannot instantiate other pages and show them as such. Instead, you either pop up a new instance of a browser window (using javascript etc.) and get it to load that other page, or you redirect the user to the other page.
3. Which scripting language should I use for my client side (browser) scripts – VBScript or JavaScript?
Use JavaScript. JavaScript is supported by almost all the modern web browsers, while VBScript is supported only by Internet Explorer. So unless you are sure that your application will be run only in Internet Explorer, don’t use VBScript.
4. I cut controls from one container (say Panel) and paste it into another. And now all the events for those controls stop firing. Why?
When you cut a control, the Handles clause of the method gets removed. Otherwise it would cause compilation error, since the control for which it should handle event is not there.
Now when you paste the control back to the form, .NET doesn't know what method it should link the events, since they are all just like any other normal method now.
As a result they become normal methods and no events are attached to them any longer. To prevent this you would need to put back the Handles clause of the event handlers manually after you are done copy/pasting. Another way is to use the Document Outline window to move your controls from one container to another.
5. When I add ListItems to asp.net ListBox using javascript, they do not reflect on the server side code after postback. Why?
Javascript modified your DOM, but that change isn't reflected until you yourself persist those changes. This isn't specific to ASP.NET, but is a fundamental feature of all server side technologies - the DOM is irrelevant unless it was rendered by the script in the first place.
See this for a working solution: http://www.vbforums.com/showthread.php?t=513229
6. I have ASP.NET controls inside my GridVew (or any other such container). I can’t refer to these controls by their IDs in my JavaScript. Why?
ASP.NET controls prefix their parent container ID to their ID so that the controls IDs are unique on the page. The generated control IDs are in the format datagrid1$ctl3$label1 etc. Use Control.ClientID to get the generated ID of the controls.
-
Re: I want your FAQs for the ASP.NET forum
A few more.
7. When I set Control.Visible = False in my asp.net server-side code, my JavaScript code can not find the control. Why?
When you set a control Visible property to False, the control is not rendered at all. So any JavaScript code eyeing on that control will stop working. If you want the control to be available on the page but not visible, set appropriate style.
e.g. style= “display:none”
8. My code does not fire TextChanged event as I type in the TextBox, even though AutoPostBack is set to True. Why?
AutoPostBack for textboxes work only when Enter is pressed. So the TextChanged event will fire only after you press Enter.
If you want it to change after every character is typed, use some sort of javascript for that.
9. I get an error if user types > or < characters in my TextBox. How should I handle this problem?
ASP.NET has a mechanism to prevent certain characters from being submitted via asp.net input controls like textbox etc, and this feature is turned on by default. This helps prevent most of code injection attempts.
However in certain cases, these may be valid inputs for your program. In those cases, set the ValidateRequests property of the page to False. Beware that doing so will open your page for code injections and you should validate those controls for bad characters yourself.
10. What is ViewState and how is it used?
When a form is submitted in ASP.NET, the form reappears in the browser window together with all form values. This is because ASP.NET maintains your ViewState. The ViewState indicates the status of the page when submitted to the server. The status is defined through a hidden field placed on each page with a <form runat="server"> control.
Maintaining the ViewState is the default setting for ASP.NET Web Forms. If you want to NOT maintain the ViewState, include the directive <%@ Page EnableViewState="false" %> at the top of an .aspx page or add the attribute EnableViewState="false" to any control.
A more detailed MSDN article can be found here: http://msdn.microsoft.com/en-us/library/ms972976.aspx
-
Re: I want your FAQs for the ASP.NET forum
That's where I was going to move it from this thread, but you can post in the other forum if you want.
-
Re: I want your FAQs for the ASP.NET forum
Ah, ok, that makes sense.
I might just start posting them in there then, and we can index them from a sticky at the top of this forum.
Gary
-
Re: I want your FAQs for the ASP.NET forum
Quote:
Originally Posted by
gep13
Also, when you say we are allowed to use html tags in the forum post, does that mean we can just type directly into the post with html tags, and this will then be moderated by someone?
That's right. :)
Quote:
Do you have to be a power poster to get this, or can anyone do it?
I'm pretty sure anyone can do it, I don't think it varies by user level.
-
Re: I want your FAQs for the ASP.NET forum
Okay dokay, when I get a free minute, I will start posting some of the FAQ's that I have lined up.
How about editing a post in that forum? Does that then also get resubmitted for moderation? I am assuming it does?
Gary
-
Re: I want your FAQs for the ASP.NET forum
I can't remember for sure, but I think edits are not moderated.
The moderating process can take some time tho (as it depends on when we are online), so be sure to make use of the Preview before you submit!
-
Re: I want your FAQs for the ASP.NET forum
Hi mendhak,
Can't we create one Post for common question , like if is related to Gridview Create one thread with the Title Gridview , reply to that post and add that link to a list of FAQ ?
-
Re: I want your FAQs for the ASP.NET forum
It's easier for me to pick and choose if you make separate threads or posts for each question, because I am not going to accept all of your FAQs, just the ones that *I* like. :)
-
Re: I want your FAQs for the ASP.NET forum
Quote:
Originally Posted by
mendhak
It's easier for me to pick and choose if you make separate threads or posts for each question, because I am not going to accept all of your FAQs, just the ones that *I* like. :)
:bigyello:
-
Re: I want your FAQs for the ASP.NET forum
-
Re: I want your FAQs for the ASP.NET forum
Click, delete, click, delete :p
(Thanks)
-
Re: I want your FAQs for the ASP.NET forum
:)
When/how are you creating the actual FAQ Index page? Are you going to wait until there is a significant number of threads first, or just build it as you are going? I have got a few more in mind that I was going to write up, it's just a case of getting some time to sit down and do them.
Gary
-
Re: I want your FAQs for the ASP.NET forum
I'm waiting for a larger number so there's a good variety to pick from. Then I'm going to my ivory tower, and will pick a few out.
-
Re: I want your FAQs for the ASP.NET forum
some from me
- How do i add controls on gridview ?
- How do is email validate using regular expression ?
- How do use javascript in ASP.NET
- How do i deploy my web Application over IIS
some Basic FAQ's
- How do i create DLL
- How do i refer DLL in my web application
- What is use of Global.asax
- What is WEB.CONFIG
Have a Happ Programming...:wave:
-
Re: I want your FAQs for the ASP.NET forum
I wonder if any of the questions/answers I posted in post #19 & #20 were worth being selected as FAQ questions?
-
Re: I want your FAQs for the ASP.NET forum
Hey,
I think there are.
This topic is just one of those things that take time, and effort to complete.
Gary
-
Re: I want your FAQs for the ASP.NET forum
So where's the list of FAQ mendhak selected for the FAQ list for this forum? I was just trying to look around if any of those questions were included, but I can't find the list itself.
-
Re: I want your FAQs for the ASP.NET forum
Hey,
I don't think it ever got made :)
I posted a few things in the VBForum FAQ Forum, you can see the links in post #29 above. I think the intention was that Mend would then create an index page, which would be a sticky at the top of this forum, linking off to the ones deemed worthy.
Gary
-
Re: I want your FAQs for the ASP.NET forum
Yes exactly.
I was looking around for the same index page, as stated in first post. But seems like it is still not ready yet.
-
Re: I want your FAQs for the ASP.NET forum
I am sure he will get round to it, can only assume that he is busy just now.
Gary
-
Re: I want your FAQs for the ASP.NET forum
ok. Till then I'll try to work on some more questions/answers and post it here to make his life even harder. ;)
-
Re: I want your FAQs for the ASP.NET forum
How about a list of free asp.net hosts? I am trying to find one at the moment.
-
Re: I want your FAQs for the ASP.NET forum
Quote:
Originally Posted by
Nightwalker83
How about a list of free asp.net hosts? I am trying to find one at the moment.
Hello there,
That is a good suggestion.
Completing the FAQs defined in this list is something that is very much on my list of things to do, I just need to sit down and tear through them at some point :(
One thing I would say with free hosts is that you get what you pay for.
Gary
-
Re: I want your FAQs for the ASP.NET forum
Quote:
Originally Posted by
gep13
One thing I would say with free hosts is that you get what you pay for.
Yes, I have joined one that I am starting to regret joining because I can't upload my site because of upload error with their site. Also, they don't give a tutorial on how exactly I am suppose to connect to their ftp server. I have an ftp client and enter the details they provide as well as my username/password but without success. I suppose it is more difficult for me because of being a web develop I have a paid web-host to host my non-asp sites however, it doesn't appear to support asp.
-
Re: I want your FAQs for the ASP.NET forum
Who is your current paid web-host? It could be that they only use Linux servers, which is fine for HTML, PHP, etc, but not for ASP.Net.
If you want to break this out into it's own thread, we can continue to discuss it there.
Gary
-
Re: I want your FAQs for the ASP.NET forum
I have a thread asking about it here.