|
setAttribute("onKeyDown","javascript:KeyDown();");
function KeyDown()
{
var whichKey = event.keyCode;
switch(whichKey)
{
case 37:
case 38:
case 39:
case 40:
}
}
I hope that's what you're looking for...
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
|
|
|
|
|
Hi all,
My problem is finding how to control the right of printing, saving a PDF file specifically and file of any type generally through IE.
Can you help me?
Thank you all!
N@m
|
|
|
|
|
When I send a Query that returns no results there is simply an error page and NOT the "NO RESULTS FOUND" that I want displayed... CAN YOU PLEASE HELP.. This is my code for the body section... all seems fine as per my tutorial?? Would you need the rest of the code page or not? It is simply suppose to display SOMETHING except an error page when you have no results in the query search???
<%
i=0
While (i<=37)
%>
><%=response.Write(CatArray(i))%>
<%
i=i+1
Wend
%>
OR
| |
<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
<% IF Recordset1.EOF OR Recordset1.BOF Then %>
<% Else %>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
Records <%=(Recordset1_first)%> to <%=(Recordset1_last)%> of <%=(Recordset1_total)%> | Category | Price | <%=(Recordset1.Fields.Item("DESCRIPTION").Value)%> | <%=(Recordset1.Fields.Item("CAT").Value)%> | R<%=(Recordset1.Fields.Item("INCL TAX").Value)%> |
<% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
<% End if %>
<% If Recordset1.EOF And Recordset1.BOF Then %>
<% End If ' end Recordset1.EOF And Recordset1.BOF %>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
this is me
|
|
|
|
|
<meta http-equiv="refresh" content="10; url="http://www.lama.com/">
That code will refresh the browser to the indicated URL 10 seconds after loading the page.
How can I cancel the refresh timer? I have tried removing the meta tag element but that does not work.
regards,
Paul Watson
South Africa
PMW Photography
Gary Kirkham wrote:
The ability to destroy a planet is insignificant next to the power of the cliché...Star Trek had it in spades.
|
|
|
|
|
How did you remove the tag? Using javascript? Once the page is loaded it's probably to late to stop it.
Are you using any server code? Then remove the tag on the server side, e.g. don't write it to the page.
---
b { font-weight: normal; }
|
|
|
|
|
By other means (window.location= / window.location.href= ), redirect to another page less than 10 sec after the page loads.
|
|
|
|
|
Pardon? I don't want the page to redirect at all, the meta refresh needs to be cancelled all together. I cannot strip out the meta refresh before it gets to the browser either.
regards,
Paul Watson
South Africa
PMW Photography
Gary Kirkham wrote:
The ability to destroy a planet is insignificant next to the power of the cliché...Star Trek had it in spades.
|
|
|
|
|
I am experiencing problems with events.
I want to develop (eventually) a keyboard pop-up window as a user control that will pass data back to the page.
I have attached a cut-down version and now basically all I have is a web form with a textbox, and a user control with a button on, which when pressed will populate the textbox with some characters.
I’m trying to use events to do this but I get errors, can any one help?
Webform1.asp.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace testeventsc
{
///
/// Summary description for WebForm1.
///
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.TextBox TextBox1;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
void uc1_OkClick(object source,EventArgs e)
{
this.TextBox1.Text = "xx";
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
Webform1.aspx
<%@ Register TagPrefix="uc1" TagName="uc" Src="uc.ascx" %>
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="testeventsc.WebForm1" %>
<title>WebForm1
<asp:textbox id="TextBox1" runat="server">
<uc1:uc id="Uc1" runat="server">
uc.ascx.cs
namespace testeventsc
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
///
/// Summary description for uc1.
///
public delegate void OkClickEventHandler(object sender, EventArgs e);
public class uc1 : System.Web.UI.UserControl
{
public event OkClickEventHandler OkClick;
protected System.Web.UI.WebControls.Button buttonOK;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
public string Value()
{
return "xx";
}
private void buttonOK_Click(object sender, System.EventArgs e)
{
OkClick(this,new EventArgs());
}
}
}
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="uc.ascx.cs" Inherits="testeventsc.uc1" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<asp:button class="Fatkey" id="buttonOK" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 12px"
="" runat="server" text="Ok">
Clueless Novice
|
|
|
|
|
Hi
Anyone have any idea why in my ASP.NET app (which has active configuration set to debug; unchanged project settings from the default; and compilation debug=true in web.config), does not trace to the output window with System.Diagnostics.Debug.WriteLine ?
The debugger will break properly, and I can step over code fine, but the cursor jumps right over a debug statement, and does not execute it.
Any ideas greatly appreciated, because this is winding me up.
Another thing i've noticed is that if an exception isn't handled, the debugger doesn't catch it: I end up with an asp.net error page in the browser.
Cheers
Jon
using System.Beer;
|
|
|
|
|
What Asp SourceCode Management Tool do you use?
I want to find an Asp SourceCode Management Tool to manage my Asp SourceCode.
Please give me some advice,Thank you!
|
|
|
|
|
I am sorry,I mean Source Control Tool
|
|
|
|
|
hi there,
U can use MS Visual source safe or u can go here
http://www.freedownloadscenter.com/Best/visual-cvs-free.html to get more info about "Source Version Control"
<< >>
|
|
|
|
|
Thank you,
I know VSS and CVS can control visual studio .net's version.
Can VSS and CVS control ASP's version?
|
|
|
|
|
I am attempting to send a message using CDO in a ASP.NET/C# Application:
I receive the following Error when trying to update the fields:
////////////////////////////////////////////
ERROR
////////////////////////////////////////////
Fields update failed. For further information, examine the Status property of individual field objects.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Runtime.InteropServices.COMException: Fields update failed. For further information, examine the Status property of individual field objects.
////////////////////////////////////////////
The code looks like the following:
////////////////////////////////////////////
//// CLASS VARIABLES
static private String _currStoreName = "My";
static StoreClass _oCurrStore;
const string CDO_MailServer = "mail.dovetailinternet.com";
const string CDO_ContentDisposition = "attachment;filename=smime.p7m";
const int CDO_SmtpPort = 25;
const int CDO_SendUsingType = 2;
private Certificates oCerts;
private Certificate oCert;
private EnvelopedData oEnvData;
////METHODS
private void CDOMail()
{
CDO.Configuration mailerConfig = new CDO.ConfigurationClass();
CDO.IMessage firstMsg = new CDO.MessageClass();
CDO.IMessage secondMsg = new CDO.MessageClass();
mailerConfig.Fields["http://schemas.microsoft.com/cdo/configuration/sendusing"].Value = CDO_SendUsingType;
mailerConfig.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserver"].Value = CDO_MailServer;
mailerConfig.Fields["http://schemas.microsoft.com/cdo/configuration/smtpserverport"].Value = CDO_SmtpPort;
mailerConfig.Fields.Update();
firstMsg.Sender = "from@internet.com";
firstMsg.To = "to@internet.com";
firstMsg.Subject = "First Message Subject";
firstMsg.TextBody = "Message One Body";
secondMsg.DataSource.OpenObject(firstMsg, "IMessage");
CDO.IBodyPart oBodyPart = secondMsg.BodyPart;
oBodyPart.ContentMediaType = "application/pkcs7-mime;smime-type=enveloped-data;name=smime.p7m;";
oBodyPart.ContentTransferEncoding = "base64";
//*** Update That Fails
oBodyPart.Fields["urn:schemas:mailheader:content-disposition"].Value = CDO_ContentDisposition;
oBodyPart.Fields.Update();
//***
secondMsg = EnvelopeMessage(secondMsg);
secondMsg.Configuration = mailerConfig;
secondMsg.Send();
}
//// ENVELOPMESSAGE
private CDO.IMessage EnvelopeMessage(CDO.IMessage msg)
{
CDO.Message oSecMsg = new CDO.MessageClass();
oSecMsg.DataSource.OpenObject(msg, "IMessage");
_oCurrStore = new StoreClass();
_oCurrStore.Open(CAPICOM_STORE_LOCATION.CAPICOM_CURRENT_USER_STORE, _currStoreName,CAPICOM_STORE_OPEN_MODE.CAPICOM_STORE_OPEN_EXISTING_ONLY | CAPICOM_STORE_OPEN_MODE.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED);
oCerts = (Certificates)_oCurrStore.Certificates;
foreach(Certificate cert in oCerts)
{
oCert = cert;
}
CAPICOM.EnvelopedData oEnvData = new CAPICOM.EnvelopedDataClass();
oEnvData.Recipients.Add(oCert);
ADODB.Stream tmpStream = oSecMsg.BodyPart.GetStream();
string strContent = tmpStream.ReadText(tmpStream.Size);
oEnvData.Content = strContent;
string strData = oEnvData.Encrypt(CAPICOM.CAPICOM_ENCODING_TYPE.CAPICOM_ENCODE_BASE64);
ADODB.Stream oStream = oSecMsg.BodyPart.GetDecodedContentStream();
oStream.Type = ADODB.StreamTypeEnum.adTypeBinary;
byte[] byteData = Convert.FromBase64String(strData);
oStream.Write(byteData);
oStream.Flush();
oStream.Close();
return oSecMsg;
}
Any help would be greatly appreciated, i've been trying to resolve the issue for hours on end, and know that eliminating this error will likely yield the desired effect.
I have been unable to find any good examples of sending CDO.Mail with .NET except the one here:
http://support.microsoft.com/Default.aspx?kbid=280391
I Followed the Instructions and am now faced with this problem. Please Help me!
|
|
|
|
|
How can I check that user is about to close the window?
I have tried the onbeforeunload function but it is also being fired if user refreshes the page... I can check if user refreshes the page by pressing F5 function key but I can't check if user click on refresh button...
I actually want to track when user has logged in and logged out so i wanna make sure that if user does not logg out and close the window then I can track logout time..
any thoughts please...
Salim Akbar
|
|
|
|
|
Don't double post. If you really really think that you have to draw attention to your question in two separate message boards, keep the question in one of them, and post a link in the other.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks, I'll be careful next time
Salim Akbar
|
|
|
|
|
Hello
I am using an ActiveX component in my web page, it all works fine localy on my machine, but when I put my code on a server and access it from a client the ActiveX dosent load. All I get is an error saying "ActiveX Component Can't Creat Object".
What do I have to change to make my solution work on the server
Spaz
|
|
|
|
|
Spaz,
Probably nothing in your code. You need to make sure that this activex component is available on the server to be downloaded to the client. Also the client should have permission set to download the activex control and install it on their machine.
Hope this helps...
Prady
|
|
|
|
|
Hello! I am a new web developer useing FrontPage2003 with Flash and a bunch of other add ins. I have Dreamweaver MX Studio but I am too Chicken to use it. uGG. Check my profile! I have A ----load of Dummybooks and non dummy books. I mean everything reguarding Design to Windows operating system. So if you need me to look something up for you I will. I am also great with Photoshop 8 and I love manipulating pictures, if you need one done just ask and if I am not busy I will look it up. I am developing about HMMMN a 60 some odd page WebSite. AHHHHHHHHHHHHHHHHHHHHHHHHHHHH.
Your new friend
Ethel
Ethel M. Jose
|
|
|
|
|
Hi Ethel. This part of the site is for posting questions. If you want to say hi, try the lounge, more people will see it there, and be more inclined to chat.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Ethel
Appreciate your interest in giving a brief introduction about you. At the same time, the place of posting an introduction really matters significantly. You may like place this introduction as part of CP Bio Page rather than as a post in a topic-specific forum like ('Web Development', 'ASP.NET') etc, which are more towards discussing problems in the specified topics and possible resolutions, workarounds etc discussed.
Vasudevan Deepak Kumar
Personal Web: http://vdeepakkumar.netfirms.com/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
I'm trying to do a 2 drop-down menus (the first is generated from an access database, using coldfusion) and i want to populate the 2nd drop down menu based on what was selected from the first. I think i have to use javascript, but i'm a newbie when it comes to javascript. can anyone give any suggestions/help/advice ?
thanks.
scott
here's the snippet to generate the first dropdown:
#heading#
based on what "#heading#" is, the second drop down is generated.
thanks.
|
|
|
|
|
I have not done it with Coldfusion but with javascript and ASP.
(It is assumed that both combo box values hav some relationship key.)
To populate the second combo box on the change of the first one.
1- Create a recordset for the second combobox.
2- In javascript make functions:
A- to populate the array with the recordset values.
B- funcion to compare the first combo box value and populate second combo box with matched values.
C- function to clear the prev values of second combo box on change of first combo box values.
3- on change of first combo box value call a Javascript function (with firstthe second combo box with the matched values. combo box value passed )that compare the value with the array and populate
Thanx n' Regards
anyla
|
|
|
|
|
Hi
i have small functionality to excecute.I have BUtton Save AS:On Save as Button Click:Allows the user to create a duplicate item. Clicking this button generates a JavaScript prompt dialog that asks the user to specify a unique name for the new item. This title will be checked for uniqueness. Once that has been specified and the user clicks the “OK” button, the system will automatically create a duplicate of the item in the database.
.Anyone can help me with coding part Thanks in adavnce.i was able to do for only save button but i have this additional functionality.anyone plz urgent
Thanks Dotnetdeveloper
|
|
|
|