|
Did you check for number of columns and number of rows?
e.g.
DataTable dtData= YourClass.GetDataTable("select * from yourtableName");
if(dtData.Columns.Count==0){return;}
if(dtData.Rows.Count ==0){return;}
I Love T-SQL
"VB.NET is developed with C#.NET"
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
in that insert query fire and data to fetch connection class to use and easily get it
|
|
|
|
|
Hi, after all the searches I managed to create a bread crumb using the link http://www.codeguru.com/vb/vb_internet/aspnet/article.php/c6851
but the bread crumb information gets lost on postback. I dont know how to store the information in page level so I could maintain it. could someone please give me some direction as to how I can solve it.
|
|
|
|
|
My idea would be to have all the breadcrumb values & logic in a separate class(if it isnt) and decouple it from UI element. then store the object of ur values & logic class in say viewstate/session and then on postbacks repopulate the UI elements with the stored values.
Or, just use sitemappath if u are using asp.net
|
|
|
|
|
Please help me out here this is the link of the website www.tippyclothing.com, where i want to incorporate this payment gateway. if anyone will help me here i would be really thankful.
|
|
|
|
|
|
Hi
I am currently using Comm100 to chat with site's visitors but i want to ask if there is a better & free chat system to integrate with an asp.net website?
Thanks,
Jassim
|
|
|
|
|
I have 6 user controls on .aspx page and i have a button on .aspx page and all the user controls in update panel with updatemode conditional and each user control in Update panel, when i click on button , i need to referesh fisrst usercontrol.
Regards,
Vishnu.
|
|
|
|
|
I think the best to do that, expose a public method like Refresh/Reload etc in user controls and when user click on button then call that method. Other way is, call put each control in separate Update Panel then call like UpdatePanel1.Update().
Please let me know if you have other concern/requirement.
Parwej Ahamad
|
|
|
|
|
You assign a trigger to the button, and tell the trigger which update panel to update.
|
|
|
|
|
Programmatically from within the application that is.
I know how to check it manually.
|
|
|
|
|
Are you using IIS 7 (or greater)? If so, you can use the Microsoft.Web.Administration namespace to get direct access to IIS.
|
|
|
|
|
Pete O'Hanlon wrote: Are you using IIS 7
Not necessarily, but probably in most cases. So that's a good starter.
|
|
|
|
|
This is the New Development for our product.
our requirement is, DAL -- can be Ms Acccess or sql server [later may be cloud(azue db)]
How can i swich between this db based on web.config
so please suggest best method , I can check in BLL , Is this a right method?
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
|
|
|
|
|
Having multiple connections in your configuration file is easy -
<connections>
<connection id="FirstConnection">
<databasename>A</databasename>
<servername>SERVER1</servername>
<integratedSecurity>True</integratedSecurity>
</connection>
<connection id="SecondConnection">
<databasename>A</databasename>
<servername>SERVER1</servername>
<integratedSecurity>True</integratedSecurity>
</connection>
</connections>
You can make the choice of connections in the DAL or the BAL layer.
I would think DAL is better because then the BAL is completely free from the decision of which database to connect to - which is the way it should be.
A pattern called the Enterprise Library supports multiple types of databases via some patterns.
|
|
|
|
|
You can do it by using n-tier architecture with interface and abstract class.
Farogh Haider
Web developer
|
|
|
|
|
While debugging my slow application, I found the culprit is
Roles.IsUserInRole
It take from 3 sec to 9 second to execute. I found the reason it through the entire user list and calls other function, but it shouldn't be that slow to what I understand.
My question is can it be made faster?
|
|
|
|
|
Your could implement a custom Role Provider[^] - I do - and then the responsibility is yours. Mine works by using a enum in the user info, so it is one access to the DB at most (normally none since the user profile is already downloaded).
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Are you trying to determine if the current logged in user is in a role, i.e. for customising a page view?
Have you tried using User.IsInRole against Roles.IsUserInRole?
Don't know what you are doing, but the User. method should not need to iterate the entire user list (unless the inner working of the membership provides end up doing the same thing).
|
|
|
|
|
I am checking if the user in in role, he is allowed access to the page. If he is not, he is shown the error message.
I have not trie User.IsInRole, somewhere I read, it give different result.
|
|
|
|
|
From what you are saying, then the User.IsInRole is what you want, as the user is already logged into the system.
|
|
|
|
|
Is
User.IsInRole faster and less expensive than
Roles.IsUserInRole
|
|
|
|
|
Ok tried it. It did work but it also took 13 seconds to execute. Note that I have tracing enabled.
|
|
|
|
|
Ok, so have you tried to profile your code and the Database.
Sounds like you have some severe latency, probably in the database on disk.
a) How many users in the user list?
b) How many roles in the roles list?
c) What sort of database are you using?
d) Is the application and the database running on the same PC? Or is it distributed? What sort of connection is between them?
e) Is their anything else that is slow in the application?
f) Are you overriding any of the base methods and trying to role your own?
These are some of the question you should be asking yourself.
Next thing to do would be create a fresh vanilla application, add a couple of users and and a couple of roles and then run the IsInRole and IsUserInRole and see what difference you get.
|
|
|
|
|
This is great advice. The fact is I have not worked a great deal with roles, profils etc and I just getting to know what providers are.
1. I have about 30 total users (max)
2. I have about 10 roles
3. SQL Server 2005
4. yes
5. No, when any page is access that has IsUserInRole, it is very slow
6. I am not overriding any function but thinking about it now.
Something to note, this application was change from time to time so it also has old users which are about the same in numbers but obviously as upgraded the program, we created new users and the old ones are still in the database.
|
|
|
|