Im running a query where it selects a property from the user with the matching username but i dont know how to find out the username of the currently loggedin user.
View Complete Post
can any body please help me...
how to find username who is login.... and please tell me how to write code for admin usernames..
i am using SQL SERVER2005 with datatyes: USERTYPE, UNAME, PWD:
here is the code for login:
Passion, intelligence, and the love of learning exemplify the ideal Microsoft candidate. Howard Dierking explores these and other recruiting philosophies.
MSDN Magazine February 2008
This month DLL problems, context menus, MFC strings to managed C++, and more.
MSDN Magazine October 2006
Reviewing code for security defects is a key ingredient in the software creation process, ranking alongside planning, design, and testing. Here the author reflects over his years of code security reviews to identify patterns and best practices that all developers can follow when tracking down potential security loopholes. The process begins by examining the environment the code runs in, considering the roles of the users who will run it, and studying the history of any security issues the code may have had. After gaining an understanding of these background issues, specific vulnerabilities can be hunted down, including SQL injection attacks, cross-site scripting, and buffer overruns. In addition, certain red flags, such as variable names like "password", "secret," and other obvious but common security blunders, can be searched for and remedied.
MSDN Magazine November 2003
This month Paul DiLascia discusses how to find windows with GetLastChild and outputting HTML with a C++ procedure equivalent to document.write.
MSDN Magazine August 2003
MSDN Magazine April 2000
I'm trying to write a bit of code that will format all the numeric values in lables in my gridview. here's what i am doing right now:
On the RowDataBound Event, i create a row object for the row that is currently being bound. then i go use the FindControl method to grab each label by name.
Problem is there's too many columns in this table and i really dont wnat to have to type it all out. Here's an example of what i am currently doing
' Get row being bound
Dim myRow = e.Row
' Get labes to be formatted
Dim lblMunicipalIncineration = CType(myRow.FindControl("lblMunicipalIncineration"), Label)
' format labels
If lblMunicipalIncineration IsNot Nothing Then
If Not String.IsNullOrEmpty(lblMunicipalIncineration.Text) Then
lblMunicipalIncineration.Text = FormatNumber(lblMunicipalIncineration.Text, 0, TriState.False, TriState.False, TriState.True)
Can i use myRow.Controls to grab a list of all the controls and then somehow get a list of all labels in the collection and then use a for loop to go through and format each label?
I am using the ASP.Net password recovery control. By default the user needs to enter their username before an email gets sent out to them.
If it possible instead of entering the username, email is used instead? Alot of my users forgets their username but not email.
Hi, I have the following code which I want to get the current username of the user logged in and use it as the @username parameter:
<asp:SqlDataSource ID="SqlDataRegionalUserAreas" runat="server" ConnectionString="<%$ ConnectionStrings:DevCPSdocshare %>"
FROM document_area d,document_area_user_access a
WHERE a.doc_area = d.doc_area_id
AND and a.username=@username">
<asp:Parameter Name="username" Type="String" />
string username = Request.QueryString["username"];
Currently I am storing my username and password (passwordFormat="SHA1") credientails in my web.config. I would like to figure out how to access them in an xml file that I have stored in my App_Data directory rather than the web.config file because I do not want my application restarting everytime I manually add a user (small list of 5 authorized users for the CMS section).
Here is what my web.config section looks like:
<authentication mode="Forms"> <forms name=".Administration" loginUrl="~/SiteAdmin/Default.aspx" defaultUrl="~/SiteAdmin/Administration/Default.aspx" protection="All" timeout="30" path="/" requireSSL="false" slidingExpiration="true" &n
here is login form I would like to use.
Right now it is not communicating with my codebehind page.
How do I modify the jquery login code to post the username and password to the codebehind?
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="styles/chop1.css" />
<!--[if IE 6]>
Thank you for advance.
I created a widows service for mail schedule with c#.net and sql server 2005 and it is working fine for past one year.
now sometimes i am getting the "System.Data.SqlClient.SqlException:
Login failed for user '<UserName>'. Reason: The account is
then i restarted the windows service manually and working.
what is the problem in my sql server connection and how to fix that issue?