.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Asad Ali
Fauzul Azmi
Post New Web Links

Login View - How to avoid unnecessary queries to db to GetRolesForUser

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :ASP.Net
 
Hi,I have built an asp.net web site with .net framework 3.5 and I am trying to avoid sending unncessary queries to my database in order not to have high server load. I have a login view in my master pages and it contains templates for anonymous users and members.To lighten my server load, I am using Sql Data Profiler and Database Tuning Advisor. I noticed that every page load triggers a stored procedure to get user role using dbo.aspnet_UsersInRoles_GetRolesForUser stored procedure.My question is that if it is necessary to check for every page load or I can store it somewhere and check later.is it Login View or Login Control sending queries ?is it about access rules to member's pages ?oris it because I used the login controls in my master page ?any suggestions and comments will help me.Thanks


View Complete Post


More Related Resource Links

How to create SQL-login with permissions for view-only SQL-Agent-Jobs?

  
Could you please help me with resolving next problem: How to create SQL-login with permissions for view -only SQL-Agent-Jobs (he cannot create, modify or delete)? I am using MS-SQL-Server version: 8.00.194 In other words : how to create in version 2000 (8.00.194) the same as 'SQLAgentReaderRole ' in version 2005 (for more details see http://technet.microsoft.com/en-us/library/ms188283.aspx).

How to avoid "'CREATE VIEW' must be the first statement in a query batch" when I need to use SET Q

  
I have a problem that I have been unable to solve.  I have a stored procedure in a database on server A that needs to create an indexed view in a database on server B.  (The environment is SQL Server 2005.)  The procedure on server A does the following:  (The EXEC statement inside the quotes is really a variable in my procedure, I've just substituted the value to make the example understandable.) EXEC sp_executesql 'EXEC [ServerB].[Database].dbo.sp_executesql @sqlStatement;' The "outer" sp_executesql causes the "inner" sp_executesql to be execute within the database on server B.  (@sqlStatement contains the CREATE VIEW syntax.)  I am able to create the view that I want to index with no problem.  However, when I attempt to create an index on the view in a subsequent step, it fails with the message "Cannot create index. Object '_dta_mv_51' was created with the following SET options off: 'QUOTED_IDENTIFIER'".  Fair enough, but if I attempt to precede my CREATE VIEW statement with the required QUOTED_IDENTIFIER, I receive an error to the effect that "'CREATE VIEW' must be the first statement in a query batch".  I'm not sure how to get around this problem.  Does anyone have the answer? SQL Server 2008 doesn't object to indexing a view that was created with QUOTED_IDENTIFIER

how to avoid grid view function calling repeatedly in itemtemplate

  


Hi

i have a grid view control

 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowUpdating="Update_1"
                    OnRowDeleting="Delete_1" OnPageIndexChanging="OnPaging" OnRowEditing="Edit_1"
                    OnRowCancelingEdit="CancelEdit" PageSize="10">
                    <Columns>
<asp:TemplateField>
                              <ItemTemplate>
                                <table>
                                    <tr>
                                        <td align="left" width="100">
                                            <cc1:CalendarExtender ID="cal" runat="server" TargetControlID="txtDate" PopupButtonID="btnpopupCalendar"
                                            >
                                            </cc1:CalendarExtender>
                                            <asp:Button ID="btnpopupCalendar" runat="server" Text="Show Calendar"  />
                                        </td>
                                        <td align="left" width="100">
                             

How to avoid login screen during debugging - SharePoint Development

  
We are doing SharePoint development on our virtual server (Win 2003) installed on Vista Business edition. During development, very time we run our ASP.NET application it asks for windows login and password despite the fact that we have commented out <authentication mode="Windows"/> in the web.config file.
How can we bypass this login screen?
Thanks……………

Multiple queries in a detail view

  

Hey ASP Guru's,
I am working on a form that has a details link(Details.aspx?id={0}&id2{1}). 
Then on the Details.aspx, the 2 variables will be used in a 
Store Procedure to create detailview. My store procedue on the Detail view page is a basic If Else statement. If ID2 = 1 then run this statement else run this statement. 
This is the tricky part the If part runs a query on a different table then the Else Part. My 2 questions are: Can this be done? and Is there a better way?

Hey ASP Guru's,


I am working on a form that has a det

avoid windows login

  

I have created an internal website and when I run it on the server it asks for a windows login which I would wish to avoid.

Does anybody have any ideas on how this could be done?

Thanks


Can I prevent all queries from using an indexed view?

  
Is there a global setting to prevent all queries from executing against an indexed view (unless specified by name)?

Truly Understanding View State

  
This article provides a detailed understanding of the ViewState.

GridView Parent Child View with JQuery Effects

  
I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.

Top .NET Performance Problems and how to avoid them

  
Every time I work with one of our .NET customers to help them with managing their application performance I come across the same problems as seen with other clients before: lots of ADO.NET queries, many hidden exceptions in core or 3rd party .NET libraries, slow 3rd party components, inefficient custom code

Model View Controller (MVC) for ASP.NET

  
Model View Controller (MVC) architectures, immediately wonder how the MVC pattern can be applied in an ASP.NET world. This article will demonstrate how the MVC pattern can be applied to an ASP.NET web application and still maintain the basic Microsoft supplied architecture.

How to detect and avoid memory and resources leaks in .NET application

  
Despite what a lot of people believe, it's easy to introduce memory and resources leaks in .NET applications. The Garbage Collector, or GC for close friends, is not a magician who would completely relieve you from taking care of your memory and resources consumption.

I'll explain in this article why memory leaks exist in .NET and how to avoid them. Don't worry, I won't focus here on the inner workings of the garbage collector and other advanced characteristics of memory and resources management in .NET.

jQuery grid view plugin

  
jqGridView is new, client-rich, XML-based, ajax grid plugin for jQuery library. jqGridView provides professional solution for representing and editing tabular data on the web. Carefully designed, with powerful script API, this editable DHTML grid is easy configurable with XML, and shows convincing results working with large amounts of data. jqGridView allows easy implementation of nice looking(managed through css). jqGridView is not platform-depending plug-in, it can be used with different web -programming platforms like: ASP .NET/ASP, PHP, JAVA, CGI scripts etc. jqGridView has hight bowser compatibility.

jQuery grid view plugin

  
jqGridView is new, client-rich, XML-based, ajax grid plugin for jQuery library. jqGridView provides professional solution for representing and editing tabular data on the web. Carefully designed, with powerful script API, this editable DHTML grid is easy configurable with XML, and shows convincing results working with large amounts of data. jqGridView allows easy implementation of nice looking(managed through css

view state vs request parameters

  

If  the view state is the data entered into the form fields then they are supposed to be available in the request parameters or request body. Then why would we need view state for?


Thanks.



Form view in ASP.NET

  

hi all...!
i have a database and i create a form with button edit,delete, New Registration..using Formview in asp.net..
everything was working good...

And i write SQL statement to get New ID number into dropdownlist/TextBox when i click button "New Registration".

i can get new(next) ID number after read database
it's also working good

Now i want change it to get ID which was deleted from table and replace the ID with new record...what i need is when i click "New Registration" i want get deleted "ID" first and then go to new record ID...

my code is here:-it working for get next ID after read database.

SELECT min(PANG)
FROM (SELECT ID + 1 AS PANG
FROM Table1
EXCEPT SELECT ID FROM Table1)
AS boon WHERE PANG &gt;300000
</p>

I thought this would be simple... Trying to create a login does an ajax check before submit

  

I have the standard .net login control that is working.  (Still learning .net after 15yrs of classic)

What I want to do is OnButtonClick run a javascript function (to do an ajax call to the db to check if login is valid or not) and if it returns true, then submit the form normally, else don't submit. The piece that I can't figure out, is how to correctly override the default click even to hit my JS routine and then submit the form properly afterwards.

Thanks ahead of time


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend