0
Posted on 4:00 AM by Softminer and filed under ,

Add this to header in ASP.NET
Response.AppendHeader("Refresh", "10; URL=http://www.softminer.net");
0
Posted on 3:58 AM by Softminer and filed under

#region "API"
[DllImport("shell32.dll")]

public static extern int ShellExecute(int hwnd,string lpOperation,string lpFile,string lpParameters,string lpDirectory,int nShowCmd);
public const int SW_MAXIMIZE = 3;
public const int SW_NORMAL = 1;
#endregion "API"
0
Posted on 3:54 AM by Softminer and filed under

DeviceName is the name of another sqlinstance

EXEC sp_addlinkedserver @server='sqlinstance', @srvproduct='',@provider='SQLOLEDB',@datasrc='sqlinstance\instance1'


EXEC sp_addlinkedsrvlogin 'sqlinstance', 'false', NULL, 'sa', ''

select * from sqlinstance.Table.dbo.linklist
0
Posted on 7:42 AM by Softminer and filed under

Add this into web.config inside


<sessionState mode="InProc" cookieless="false" timeout="60"/>

0
Posted on 7:21 AM by Softminer and filed under

bz default it is not possible to write HTML tag in Textbox in ASP.NET, if you want to disable it, just add this tag to the page header ValidateRequest="false"

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="frmLogin.aspx.cs" Inherits="frmLogin" ValidateRequest="false" %>
0
Posted on 7:11 AM by Softminer and filed under

if you divide two int then the result is always integer even if you save it in Decimal.

int A = 32;
int B = 36;
decimal result = A / B;

then the result = 0

but if you use
decimal A = 32;
decimal B = 36;
decimal result = A / B;

then the result = 0.8888888888
0
Posted on 7:06 AM by Softminer and filed under ,

Hier you can find free TextEditor for ASP.NET : http://freetextbox.com/

this is the Demo

Screenshot