|
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
|
|
|
|
|
I'm developing a page that uses a table and lists objects. Each object also have a tooltip which is created by using a javascript from here:
http://migoicons.tripod.com/dhtips.htm
I more or less add these in a javascript block:
Text[0]=["The Title","This Tip has a title or caption"]
and then use
onMouseOver="stm(Text[0],Style[0])"
on every object. The thing is that I have quite a number of objects and the Text[] will get up to 90+ and for some reason after 29ish the script just stops working. I'm wondering if there is a maximum size limit on javascript and if is is there a way to get around it? Or do you think the problem is something else?
|
|
|
|
|
There is probably some kind of size limit, but you not even close to it. If you had 9.000.000 records in the array, then perhaps...
I would guess that the most likely reason is the contents of the strings in the array. You probably have a quote or a backslash in some of the strings, that breaks the code.
Quotes has to be coded as \" and backslashes as \\ in a string surrounded by quotes.
---
b { font-weight: normal; }
|
|
|
|
|
hiho
i read a book about linux networking and it describes some techniques for a server
but my question is more about software architecture than linux programming
so i post it here
1. multiplexing (select())
2. multiprocess (fork())
3. multithreaded (pthread's)
i understand the architecture of a process pool in which every process holds a thread pool where every thread calls accept on a socket to get the connection
the kernel then makes the decision which thread gets the connection
and that's why i don't understand multiplexing
because i think multiplexing does exactly the same
you use select to wait for a connection (or a descriptor to change its state) and then make accept
but if this can the kernel do for you
what is a multiprocessed, multithreaded multiplexing server good for?
or what exactly is a multiplexing server compared with a multiprocesses/multithreaded server?
thx@ll
|
|
|
|
|
Hi, I have the situation where a user is able to select a voucher type. On clicking add, instead of posting back to the server, I just want to append the details to an Orders table. The table would probably contain cellphone number and voucher type (so 2 columns, and possibly a hidden index column if possible).
I actually dont know where to start on this, so if you know any good tutorials, please send them to me. Thanks
|
|
|
|