|
-
Nov 30th, 2009, 05:45 AM
#1
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.
-
Nov 30th, 2009, 05:47 AM
#2
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??
-
Nov 30th, 2009, 05:52 AM
#3
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
Last edited by gep13; Nov 30th, 2009 at 06:51 AM.
-
Nov 30th, 2009, 03:05 PM
#4
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
-
Dec 1st, 2009, 02:28 AM
#5
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
-
Dec 1st, 2009, 02:31 AM
#6
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?
-
Dec 1st, 2009, 02:44 AM
#7
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..
Please mark you thread resolved using the Thread Tools as shown
-
Dec 1st, 2009, 04:26 AM
#8
Re: I want your FAQs for the ASP.NET forum
1- View state
2- Session state
-
Dec 1st, 2009, 10:37 AM
#9
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?
-
Dec 1st, 2009, 11:18 AM
#10
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
Please mark you thread resolved using the Thread Tools as shown
-
Dec 1st, 2009, 01:13 PM
#11
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.
-
Dec 1st, 2009, 03:32 PM
#12
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
-
Dec 2nd, 2009, 02:39 AM
#13
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.
-
Dec 2nd, 2009, 02:44 AM
#14
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
-
Dec 2nd, 2009, 12:09 PM
#15
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]
-
Dec 2nd, 2009, 12:13 PM
#16
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
-
Dec 2nd, 2009, 12:24 PM
#17
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 ) 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).
-
Dec 2nd, 2009, 12:30 PM
#18
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
-
Dec 2nd, 2009, 03:00 PM
#19
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.
-
Dec 2nd, 2009, 04:15 PM
#20
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
Last edited by Pradeep1210; Dec 2nd, 2009 at 04:20 PM.
-
Dec 3rd, 2009, 03:48 AM
#21
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.
-
Dec 3rd, 2009, 04:01 AM
#22
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
-
Dec 3rd, 2009, 08:28 AM
#23
Re: I want your FAQs for the ASP.NET forum
 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. 
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.
-
Dec 3rd, 2009, 08:49 AM
#24
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
-
Dec 3rd, 2009, 08:54 AM
#25
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!
-
Dec 3rd, 2009, 09:11 AM
#26
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 ?
Please mark you thread resolved using the Thread Tools as shown
-
Dec 4th, 2009, 11:43 AM
#27
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.
-
Dec 8th, 2009, 02:07 AM
#28
Re: I want your FAQs for the ASP.NET forum
 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. 
Please mark you thread resolved using the Thread Tools as shown
-
Dec 14th, 2009, 02:14 PM
#29
Re: I want your FAQs for the ASP.NET forum
Last edited by gep13; Dec 15th, 2009 at 11:19 AM.
-
Dec 15th, 2009, 03:42 AM
#30
Re: I want your FAQs for the ASP.NET forum
Click, delete, click, delete 
(Thanks)
-
Dec 15th, 2009, 03:47 AM
#31
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
-
Dec 15th, 2009, 03:58 AM
#32
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.
-
Dec 15th, 2009, 04:44 AM
#33
Hyperactive Member
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...
MCP, MCTS, Microsoft MVP [Asp.Net/IIS]
For more .NET development tips visit .NET Tips
If the post is useful then please  Rate it
-
May 19th, 2010, 02:41 PM
#34
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?
-
May 19th, 2010, 03:01 PM
#35
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
-
May 19th, 2010, 03:09 PM
#36
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.
-
May 19th, 2010, 03:28 PM
#37
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
-
May 19th, 2010, 03:33 PM
#38
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.
-
May 20th, 2010, 01:35 AM
#39
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
-
May 20th, 2010, 02:08 AM
#40
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|