Topics
-
- 2 replies
- 1.1k views
I have a form and once the user submits it, I have the submit button no longer visible but if the user hits the back button on the browser, the form with all its information is still there. I have tried a variety of things to get the page to expire when the user hits the back button. Right now, the code at the top of the .aspx page looks like this: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="premConv.aspx.vb" Inherits="webforms.premConv"%> <%@ OutputCache Location="None" VaryByParam="None" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> &l…
Last reply by lorena, -
-
- Administrators
- 7 replies
- 1.5k views
I have another problem with a stored procedure. What I am tryin to do is if the @discipline variable is not empty append my search variable, please see below: CREATE PROCEDURE [dbo].[spSearchComm] @project as varchar(50), @search as varchar(255),@discipline as varchar(50) AS declare @strQuery varchar(8000) declare @strOrig varchar(3) set @strOrig = 'Yes' set @strQuery = 'SELECT * FROM commentsTbl WHERE projName=''' + @project + ''' and original=''' + @strOrig + ''' and commtitle like ''' + @search + ''' or commDesc like ''' + @search + ''' or commAction like ''' + @search + '''' if @discipline != " @strQuery .= ' and commDisp='' + @discipline + ''' end if exec (@s…
Last reply by PlausiblyDamp, -
-
-
- Leaders
- 2 replies
- 1.4k views
I am currently in a college coarse and need help with a problem. I am trying to make it so that when (physically) press enter while being in a text it will create a msgbox(""). I have everything working except for the fact that I can't find a way to make enter become a trigger for an action. Please help
Last reply by anthony, -
-
-
- Leaders
- 7 replies
- 1.9k views
Hi all, I'm in the process of writing my first application for the compact framework. I need to write an event handler that handles all keyup events. Now obviously I could simply override the OnKeyUp event of the form, which is something I have tried with limited success. Whenever another control on the form has the focus the keyup event handler will obviously not fire. I would have thought that this would be a common problem, I did a few searches on msdn but it didn't come up with anything that looked quite like what I was looking for. Is there a solution to this?
Last reply by IceAzul, -
-
- 1 reply
- 2.6k views
Hi, I am trying to simulate a PictureBox.Click event using the Compact Framework 1.0. I have searched these forums and the ones on MSDN with many different combinations of search terms but I cant find anything. Basically what I am trying to achieve is to fire the picturebox's click event from within my code. What I have read so far seems to indicate that I need to make a call to SendMessage (COM interop?) to actually make windows perform the click. The other method that I am investigating is the use of the mouse_event as demonstrated in this article by Daniel Moth. However I am struggling to find the namespace Win32Api anywhere in the framework so I'm struggli…
Last reply by Superfly1611, -
- 2 replies
- 892 views
Hi everybody. Am using asp.net and am developing a site that handles data. Part of the functionality is to create a text file on the server (triggered and populated with values from the client) as part of daily report/s and validation. (the text file will be used to compare with the crystal reports values and and values from the table to see if all transactions were recorded properly) right now I have this: Dim Writer1 As New IO.StreamWriter("C:\serverpathgoeshere\machinegeneratedfilename.txt") For ctr As Int16 = 0 To myds.Tables(0).Rows.Count - 1 addContents(myds.Tables(0).Rows(ctr)("accountno"), 20) 'more lines go here …
Last reply by Eduardo Lorenzo, -
-
- Leaders
- *Experts*
- 14 replies
- 4.6k views
how can I clear the cookies from internet explorer. is there any built in function or do I have to scan for each file? if so, could you please provide me with sample code. If possible please make it as simple as possible since I am new:D
Last reply by Eduardo Lorenzo, -
-
- 0 replies
- 1.2k views
Hi, I am working on a project and I am trying to publish this application in visual studio. The application has a couple of XML files which it reads from for various uses, in the development environment it is fine. However when I publish to a folder on my desk top, even though all of these files are there in the published folder including these XML files. The application fails to get the information from these XML files. Also I suppose this is ok but I noticed these XML files have been remamed to something like this: file.xml.deploy. Any ideas always appreciated. Thanks, Dave.
Last reply by davearia, -
- 1 reply
- 1.2k views
Hi everybody. I am developing a site and it has a print function. I used the window.print() method of javascript for this. My task now is to find out if the document printed properly.. :confused: without user intervention/input. It flows like this.. user clicks the print button and the print dialog is opened and user clicks print. The document prints.. everything is well and I disable the print button so the data cannot be printed again. Problem is what if the printer experienced a problem like paper jam or somthing? I hope there is a way to find out if the printer DID NOT print so I can execute some lines or asp.net to adjust the page. BTW I am using …
Last reply by Eduardo Lorenzo, -
-
- Leaders
- 4 replies
- 5.5k views
I'd like to have an autosize textbox and combobox. While these controls do have a (hidden) AutoSize property, setting this property doesn't seem to have any impact. So I have come up with the following code, which you will appreciate is not perfect. Any suggestions for improvements, especially removal of the figure 6? Public Class Form1 Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged, ComboBox1.TextChanged With CType(sender, Control) Dim lbl As New Label Me.Controls.Add(lbl) lbl.Font = .Font lbl.AutoSize = True lbl.Text = .Text …
Last reply by rbulph, -
-
-
- Administrators
- 3 replies
- 1.3k views
Hi, I am trying to create a datadapter using a stored procedure, however my stored procedure requires a value @project passed to it, I would normally acheive this like so: Dim myCmd As New OleDb.OleDbCommand("spQryLogin") myCmd.CommandType = CommandType.StoredProcedure myCmd.Parameters.Add(New OleDb.OleDbParameter("@projName", OleDb.OleDbType.VarChar)).Value = MRCSData.Instance.ProjectName However I can't seem to find a way to pass this value to my stored procedure when creating a dataadapter, below is the code that I am using: Dim strReportName As String Dim myDB As New DBAccess Dim myReader As OleDb.OleDbDataReader =…
Last reply by IUnknown, -
-
UI initiates Client Thread 1 Call to Server (Client Thread 1 Lock) Server Delegates Message to Client (Client Thread 2 starts) *server proessing not yet complete* Client uses Me.Invoke to display (showdialog) form on the UI thread Problem: The UI thread is locked so the process hangs.... I have tried creating the intital UI call to the server on a different thread but still cannot get it to work.
Last reply by Roey, -
- 2 replies
- 1k views
I have a very long webform to be used for insurance changes. I have a series of radio buttons within each section (Medical, Dental, Life Ins, etc) which users click to indicate which type of change they want to make. With Medical it's no problem, we have one type of Medical and it will be for the employee or employee and family. With Dental, however, I have the radio buttons, two checkboxes and a dropdown. I need to figure out a way to make sure, if the user selected "Add" for the Dental portion, that they also check at least one checkbox and make a selection from the dropdown. I am probably overthinking it, but I am having a problem figuring out how to do this. Here is…
Last reply by lorena, -
-
- Leaders
- 5 replies
- 1.8k views
I am trying to make my server listen continually. My server currently listens for a client and when the client connects the exchenge info. My problem is I want to keep serving other clients. Do I need to use multiple sck controls or does this handle it in .net? I remmember doing this in vb6 using 2 controls one to listen and one to accept the request and transfer info. Please help I know this has to be easier now. Thanks in advance. I found this post and replied. I just don't understand how to convert the code to VB.
Last reply by MrPaul, -
-
- 1 reply
- 1k views
I have this table Postcode Town County BB9 4TL Burnley Lancashire BB9 4TP Burnley Lancashire BB8 4TJ Burnley Lancashire PR8 4YU Preston Lancashire PR4 3TY Preston Lancashire FY4 4TY Blackpool Lancashire FY7 9TY Blackpool Lancashire Theres a lot more, its over a million rows but what I want to end up with is unique town/county pairs with either the first postcode, or any postcode relating to that pair. So my results should look like: Postcode Town County BB9 3TL Burnley Lancashire PR8 4YU Preston Lancashire FY4 4TY Blackpool Lancashire Thanks
Last reply by MrPaul, -
- 0 replies
- 1.1k views
If you have the time to kill, try reading "What code DOESN'T do in real life (that it does in the movies)": http://www.drivl.com/code.html
Last reply by ALEX_0077, -
- 1 reply
- 2.4k views
I have a simple project, with a master page that has a <form runat="server"> in it, all 'content pages' are inside the open and close form tags. I have some stuff in the master page that needs the <form> (TreeView for navigation) and I have some stuff in the content pages that need the <form> (Calander Control for date picking) Everything was working good, until i tried to impliment google adsense search, it requires the following code to be on the 'search' page. The issue is that this code here requires a form with a specific method (get) and action (search.aspx). This code below doesn't actually ever do the 'get' when I press the button, becau…
Last reply by dinoboy, -
- 5 replies
- 1.2k views
Why won't this int keep incrementing? I just created a simple web page in VS2005 and dropped a button and a label. I simply want the label to increment every time the button is pushed, which works fine the first click, but after that Count is always 1. What simple thing am I not seeing? public partial class _Default : System.Web.UI.Page { public int _count = new int(); public void Page_Load(object sender, EventArgs e) { } public void btnIncrement_Click(object sender, EventArgs e) { Count = Count + 1; lblCount.Text = Count.ToString(); } public int Count { get { return _count; } set { _count = value; } } } and if you want to see the generated …
Last reply by dinoboy, -
- 1 reply
- 799 views
I have an SQL table with a column called Town, it looks something like this Burnley Burnley Burnley Blackburn Preston Colne Colne Preston Blackburn I need to get the counts of each town in the database so I want my results to look like this Burnley 3 Blackburn 2 Preston 2 Colne 2 Is there anyway I can do it just using a plain SQL statement? Thanks
Last reply by dinoboy, -
- 0 replies
- 1.5k views
Something really strange: protected void WaitForData() { if(this.SocketCallback == null) { this.SocketCallback = new AsyncCallback(OnDataReceive); } ServerSocket state = new ServerSocket(); state.Socket = this.Socket; this.Socket.BeginReceive(state.buffer1, 0, state.buffer1.Length, SocketFlags.None, this.SocketCallback, state); } public void OnDataReceive(IAsyncResult result) { ServerSocket socket = (ServerSocket) result.AsyncState; int bufferOffset = this.Socket.EndReceive(result); if(bufferOffset > 0 && bufferOffset != socket.buffer1.Length) { byte[] temp = new byte[bufferOffset]; for(int i = 0; i < temp.Le…
Last reply by MrLucky,
-
Who's Online 0 Members, 0 Anonymous, 50 Guests (See full list)
- There are no registered users currently online