Skip to main content

Posts

Showing posts with the label ASP

how to maintain session in asp 3.5 with c#

There are different ways. You can use form authentication , it's a way to do that. <system.web> <authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="All" timeout="30" name=".ASPXAUTH" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="default.aspx" cookieless="UseDeviceProfile" enableCrossAppRedirects="false" /> </authentication> <authorization> <allow users="admin" /> <deny users="*" /> </authorization> </system.web> private void btnLogin_Click(object sender, System.EventArgs e) { if (Validate(txtUsername.Text, txtPassword.Text)) { FormsAuthentication.Initialize(); String strRole = txtUsername.Text; FormsAuthenticationTicket fat = new For...

ActiveX - Send an Operator Logo to Nokia phones in ASP

<%     Set sms = Server.CreateObject( "Simplewire.SMS" )     ' Subscriber Settings     sms.SubscriberID = "123-123-123-12345"     sms.SubscriberPassword = "Password Goes Here"         ' Message Settings     sms.MsgPin = "+1 100 510 1234"     sms.MsgFrom = "Demo"     sms.MsgCallback = "+1 100 555 1212"     ' Smart Message Settings     sms.OptPhone = "nokia"     sms.OptCountryCode = "Country Code goes here"     sms.OptNetworkCode = "Network Code goes here"     sms.MsgOperatorLogoFilename = Server.MapPath("example.gif")     Response.Write("<b>Sending message to Simplewire...</b><br>")     ' Send Message     sms.MsgSend         ' Check For Errors     If (sms.Success) Then ...

ActiveX - Send a Ringtone to Nokia phones in ASP

<%     Set sms = Server.CreateObject( "Simplewire.SMS" )     ' Subscriber Settings     sms.SubscriberID = "123-123-123-12345"     sms.SubscriberPassword = "Password Goes Here"         ' Message Settings     sms.MsgPin = "+1 100 510 1234"     sms.MsgFrom = "Demo"     sms.MsgCallback = "+1 100 555 1212"     ' Smart Message Settings     sms.OptPhone = "nokia"     sms.MsgRingtone = "Simplewire:d=4,o=5,b=63:8a,8e,32a,32e,16a,8c6,8a,32c6,32a,16c6,8e6,8c6,32e6,32c6,16e6,8g6,32g,32p,16g,32c6,32g,16c6,8e6,32p"     Response.Write("<b>Sending message to Simplewire...</b><br>")     ' Send Message     sms.MsgSend         ' Check For Errors     If (sms.Success) Then         Response....

ActiveX- How to shutdown reboot logoff WIndows 9x NT Me 2000

program shutdown; {$APPTYPE CONSOLE} uses   SysUtils,   Windows; var    logoff: boolean = false;    reboot: boolean = false;    warn: boolean = false;    downQuick: boolean = false;    cancelShutdown: boolean = false;    powerOff: boolean = false;    timeDelay: integer = 0; function HasParam(Opt: Char): Boolean; var    x: integer; begin      result := false;      for x := 1 to paramCount do          if (paramstr(x) = '-'+opt) or (paramstr(x) = '/'+opt) then result := true; end; function GetErrorString: String; var    lz: Cardinal;    err: array[0..512] of Char; begin      lz := GetLastError;      FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, nil, lz, 0, @err, 512, nil);      result := string(err); end; procedure DoShutdown; var    rl...

ActiveX sample source codes - Another month, day, year dropdown creator

<script language=javascript> function fnSubmit(strPage) {   document.forms[0].action= strPage   document.forms[0].submit()    } </script> <% 'here is the call writedropdowns ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Sub writeDropDowns()   Dim strSelfLink   strSelfLink = request.servervariables("SCRIPT_NAME")   response.Write "<form name=dates method=post>" & vbcrlf   response.Write MonthDropDown("month1",False,request("month1"),strSelfLink) & " " & DayDropDown("day1", "",getDaysInMonth(request("month1"),request("year1")),request("day1")) & " ...