rss
twitter
facebook

Home

How to get last string value

declare @lastString varchar(50);
SELECT @lastString = Field FROM [Table] WHERE Field='2015,1289,613431220'

SELECT SUBSTRING(@lastString , LEN(@lastString) -  CHARINDEX(',',REVERSE(@lastString)) + 2  , LEN(@s)  )


Read More

How to clear Query string value in asp.net

PropertyInfo isreadonly = typeof(System.Collections.Specialized.NameValueCollection).GetProperty("IsReadOnly", BindingFlags.Instance | BindingFlags.NonPublic);
                // make collection editable
                isreadonly.SetValue(this.Request.QueryString, false, null);
                // remove
                this.Request.QueryString.Remove("id");
 
http://www.codeproject.com/Questions/310625/How-to-clear-Query-string-value-in-net 

Read More

Enabling NTLM Authentication (Single Sign-On) in Firefox

This HowTo will describe how to enable NTLM authentication (Single Sign-On) in Firefox.
How many of you have noticed that when you are using Internet Explorer and you browse to your companies intranet page that it will automatically authenticate you but when you use Firefox you will be prompted with a login box?
I recently, in searching for solutions to allow NTLM authentication with Apache, stumbled across how to set a preference in Firefox that will pass the NTLM authentication information to a web server. The preference is network.automatic-ntlm-auth.trusted-uris.
So how do you do it?
1) Open Firefox and type "about:config" in the address bar. (without the quotes of course)
2) In the 'Filter' field type the following "network.automatic-ntlm-auth.trusted-uris"
3) Double click the name of the preference that we just searched for
4) Enter the URLs of the sites you wish to pass NTLM auth info to in the form of:
http://intranet.company.com,http://email.company.lan
5) Notice that you can use a comma separated list in this field.
6) Updated: I have created VBScript that can be used to insert this information into a users prefs.js file by using group policy or standalone if for some reason you want to use it for that.


http://sivel.net/2007/05/firefox-ntlm-sso/
Read More

how to format datetime in gridview for minutes OR Date



FORMAT MINUTES
<asp:BoundField DataField="HoraAT" HeaderText="Hora" ReadOnly="True" SortExpression="HoraAT" DataFormatString="{0:hh}:{0:mm}" />


FORMAT DATE

<asp:BoundField DataField="CriatedOn" HeaderText="CriatedOn"  DataFormatString="{0:yyyy-MM-dd}"      SortExpression="CriatedOn" Visible="false"/>
Read More

Howe to make random top X rows sql

SELECT TOP [Number]  [Field] FROM [TableName]
ORDER BY NEWID()


Read More
 
Powered by Blogger