Monday, August 25, 2008

ASP.Net FAQ


1) How security is implemened in asp.net
2) In my website for eg. it has around 100 aspx. In that I want 20 aspx files should be available to the users only if they are logged in. How can I achieve this with web.config file.
3) What do you meant by default view.
4) Difference between stored procedure and stored functions.
5) I have a file called a.aspx which has some textboxes. I want to post the values to b.aspx without using response.redirect. How can I do this.
6) Different between datagrid and datalist.

from aspnet101.com faqs
1. Is it possible to have more than one Validator for a single ASP.Net Server Control?
You can include multiple validators on one control. For instance, let's say you have a TextBox for users to enter an email address. First off, you want it to be required, so you use a RequiredFieldValidator. But, also, you want to make sure you have an email address that is in the correct 'email' format.
2. Therefore, you can include a RegularExpressionValidator to validate the input, to make sure it is in the correct format, before it's submitted via the form. In both instances, the ControlToValidate can be the SAME TextBox - no problem!
3. Why isn't my ExecuteNonQuery updating my database?
4. Why isn't my (ItemStyle/HeaderStyle) tag properties working correctly?
5. What's the difference between a Placeholder and a Panel?
6. How can I limit a textbox to ONLY numeric characters?
7. What is 'Server.MapPath'?
8. Is it possible to use @@Identity with MS Access?
9. Why am I getting the error - "Could not find installable ISAM"?
10. How can I add a 'Friendly' name to my ASP.Net email To and From Properties?
11. Why won't my Access Update statement update the database, but won't give me an error?
12. Can ASP and ASP.Net share session variables?
13. How can I set focus on an ASP.Net TextBox Control when the page loads?
14. How do you compare two dates in code?
15. How can I loop through either all or certain types of controls on a page?
16. How can I use Javascript to set focus in a particular ASP.Net text box?
17. How can I access an MS Access database in my ASPX page, if the db is on a remote server?
18. How can I check a DataSet to see if it's empty?
19. Why does text from a MultiLine TextBox display in only one line when I know there are Line feeds?
20. How can I disable a button to keep away multiple clicking?
21. How can I change MSDE's Authentication Mode?
22. What do I need to get started with ASP.Net?
23. Why am I getting the error: "Type '(OleDb or SQL)Connection' is not defined."
24. Why is all the data retrieved in one line, with no line breaks?
25. Can I use ODBC with ASP.Net?
26. How do I open a new form up eg. on a button's click event?
27. How can I check a DataReader to see if it's empty, before displaying?
28. Why won't my selected item trigger the event for my DropDownList
29. Why am I getting the error, 'Syntax error in INSERT INTO statement'?
30. Why do I always get an error that says 'Login Failed' when trying to connect to SQLServer/MSDE?
31. Can I still use Server.Mappath with ASP.Net?
32. Why am I getting an 'AllowCustomPaging must be true and VirtualItemCount must be set for a DataGrid with ID MyDataGrid when AllowPaging is set to true and the selected datasource does not implement ICollection' Error?
33. Why am I getting an error - "Operation must use an updateable query"?
34. Why do my listbox or dropdownlist items show up as 'System.Data.Comm.DbDataRecord Error'?
35. How do I select a specific item in a DropDownList?
36. Why aren't my ASP.Net Server Controls showing up on my ASPX pages?
37. How do I select a specific item in a ListBox?
38. Why won't my dropdownlist or listbox selected item remain set when the page posts back?
39. Where is the best place to store global Database connections?

1 comment:

Missing Date

I need to check in a table, is the all day data available, here is the handy script to check the same.. DECLARE @startdate DATETIME ...