Topics
-
- 1 reply
- 852 views
I have a richtextbox on a form. A network stream keeps on providing it with text. Text is added to the bottom of the textbox and I keep the focus on the bottom line (default is to go back to the top of the textbox when text is added). What I need to do however is cut out text from the TOP of the textbox a certain amount of text once there is a certain amount of text in the control (you get memory overflows after a while). A) How do I tell how many lines of text are in my richtextbox? B) How do I trim lines of text from the top of the textbox?
Last reply by Machaira, -
- 9 replies
- 1.4k views
I have a customer lookup screen. We set it up to select max 500 records from anywhere in the table. If the user includes some text for searching though, we select the 250 before and the 250 after the search phrase. Here is an example: SELECT TOP 250 Item,Description FROM Inventory WHERE Item <= 'FR' UNION SELECT TOP 250 Item,Description FROM Inventory WHERE Item >= 'FR' ORDER BY Item If for instance the records before the first instance of FR would be: Rec 400: Example98 Rec 401: Example99 Rec 402: Free1 Rec 403: Free2 But the result I got was not what I was looking for. I do not receive the 4 records in my results. I get records 1-250 and record…
Last reply by bri189a, -
- 3 replies
- 1.2k views
Hello everybody, I want to know if it is possible to know which control of the form has fired an event while staying in the Page_Load routine. I know that we can know the control in the handler of the event, but I need to know it in Page_Load. Any idea? Thanks for your help
Last reply by Hyuga, -
-
- Administrators
- 5 replies
- 945 views
Hi there, I want to generate intellisense to my custom server control in aspx file. How to do that. What concepts i have to study. I am very new in creating custom controls. Could anyone help me.
Last reply by Helvis, -
-
- 7 replies
- 1.1k views
This question is purely theoretical but I've become unsure whats the best way to compare datatypes (most specifically int vs string). Lets say I have a some kind of collection (from a database) and everything is a string, lets say dg.Row["PersonID"] and I have a method that returns an int, called PersonID(). Please note that if I designed this database table and set the PersonID as an int in the database it's toally irrelovant. Especially when I compound the fact that you code assume this database has HAS to be an int when future changes might dictate otherwise. There are two ways to go about this, I can choose to code to the lowest denominator like so: if (Per…
Last reply by jmcilhinney, -
- 1 reply
- 1.3k views
I have some html code: <font color="#0D4985">Click </font> <a href="javascript:hideMe();"> that I need to convert to asp.net I will need to javascript:hideMe(); when the asp.net page loads. (well.. It can stay open if a login attempt just failed) any ideas? thanks Lee
Last reply by bri189a, -
- 1 reply
- 732 views
In the process of converting a j++ project to C#. In the j++ project we have one form called frmWizard. We have these other forms which copy their controls to frmWizard. This is accomplished by copying the Panel which contains all the controls on the form. Then we use the method in the Panel in frmWizard to copy all the controls onto it. An example of this is. pnlQuestions.setNewControls(new Control[]{frmDialog.pnlPUProdAllocation}); The converted code looks something like this. pnlQuestions.Controls.AddRange(new Control[] {frmDialog.pnlPUProdAllocation}); My question is......Is there an easier and cleaner way to do this in C#???
Last reply by Machaira, -
- 1 reply
- 2.1k views
I have a piece of equipment I need to send data to in the form of a UDP packet, But the packet has a specific header and other information. I can capture a sample packet but I'm not 100% sure how to decode it into what I need to know. Here is an example of the packet sent with no additional information added. 127.0.0.1 : 1404 Length = 25 bytes : MD5 = BDD021E92EDE036451EAE709FF23D966 --- 07/20/2005 13:56:36.377 0000 00 00 0A 02 00 00 00 00 00 00 00 00 00 00 51 49 ..............QI 0010 44 33 03 00 00 00 00 00 00 D3....... and one with data added 127.0.0.1 : 1405 Length = 86 bytes : MD5 = 3A2B6C5147E89AD3A2FA2F5EBFDFC701 -…
Last reply by ZeroEffect, -
- 1 reply
- 2.2k views
I want to execute a SQL command using the DataTable.Select command on my datatable. Problem is my column contains data that contains asterisks (*). I want to select all data that contains an asterisk (*). My current command looks like: myTable.Select("column0 like '%*'") but this returns all rows when it should only return the single row that actually meets my requirements. So, I tested. 1. myTable.Select("column0 like '*'") returns all rows. (didn't know that) 2. myTable.Select("column0 like '%'") returns all rows. (Yes, i knew that) 3. myTable.Select(@"column0 like '%\*'") returns nothing. 4. myTable.Select(@"column0 like '%/'*") returns nothing. …
Last reply by kasdoffe, -
-
- Administrators
- 7 replies
- 942 views
Hi Everyone, Just a quick question here - Is there any real advantage in using the SqlCommand object (or any Command object, for that matter)? TIA, Paul.
Last reply by mandelbrot, -
-
- 1 reply
- 729 views
I have one TextBox say txtBox1 followed by a DropdownList --ddl1 and another textBox2 below that. Now the user types a name into textBox1 and then selects one Item from the dropdown list.Now if the selected dropdownItem's index is 2 I want to copy textBox1.Text to TextBox2.Text. other wise TextBox2.text is to be cleared. Can some one urgently help me with a javascript function to do this ? Iam using asp.net with VB.net coding :( :( :(
Last reply by sureshcd10, -
- 5 replies
- 1.7k views
I have an Intranet ASP.Net app that retrieves the current visitors Active Directory username via HttpContext.Current.User.Identity.Name which works fine locally (after setting Directory Security on the folder, of course, also set on the test server) and for other users it works fine on my test server but when I view the webapp on the test server the app always returns the local admin account (ex: servername/Administrator) instead of my AD username (ex: domain/JDoe). How do I force the AD credentials take precedence over the server local credentials?
Last reply by travisowens, -
- 0 replies
- 507 views
I was hoping that someone can help me with a problem. I am trying to link my web-site to the Protx payment system using VB.NET and Protx's VSP DIRECT. I have downloaded the .Net kit that protx supply and have referenced the protx.vb.dll and imported protx on my checkout.aspx.vb when I click submit to send the relevent details as a string I get this error. Server Error in '/' Application. Object reference not set to an instance of an object. 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:…
Last reply by bodar77, -
- 2 replies
- 955 views
Hi, I am having problems to use the user controls. What i want to do is to use two different user controls on a page but one user control is dependent upon the value of the other user control. Like I have controls ctl1 and ctl2. The ctl2 uses some values which the ctl1 contains. I want to use then in such a way that i have to do nothing on the page means the controls should automatically handle them. Also it is not possible for me to merge the both controls. Regards,
Last reply by AsifCh, -
- 3 replies
- 895 views
Hi All, I was wondering about performance issues for my ASP.NET site. Looking at the HTML I have a lot of ASP.NET controls such ASP image and ASP panel etc. Would my performance improve by much if say I replaced the panel for say a HTML table or is this unecessary? Also is there performance improvements for disabling viewstate (which I don't use for this site) etc? I would rather harness as much from ASP.NET as possible but I am worried that doing so mucxh may slow down my site. For example I built an e-commerce site a while ago http://www.bigred.me.uk/JokePoint/Default.aspx which seems slow at uploading initially, this maybe the amount of ASP controls but …
Last reply by bri189a, -
- 1 reply
- 4.9k views
Exception: System.UnauthorizedAccessException: Access to the path "C:\Temp\test.xml" This was working okay, gave me a problem , thought i had solved it with the following line of code in the web.config file (added <identity impersonate="true"/>) but now the problem is back. This is the method that is giving me the problem, so one said that i may need a finally after the catch section to close the stream that i am opening but i am doing that already at the end of the try section. public void btnValidate_Click(object sender, System.EventArgs e) { if(inFileLocation.Value == "") { lblfileLoc.Visible = true; } i…
Last reply by bri189a, -
- 5 replies
- 2.7k views
Note: issue resolved, see 2 posts down as I've included my fix for others to find In pre-ASP.Net days if one wanted to add a popup that made a user confirm a delete action all one had to do was add the following Javascript to the item... onclick="Javascript:return confirm('You are sure you want to permenatly delete this record, is this ok?')" But it seems when I paste this into ASP.Net I get a very generic error Compiler Error Message: CS1026: ) expected Even though THERE IS NOT A PROBLEM WITH MY ()s anywhere, I've even had a 2nd developer double check my code. A quick google search reveals at least 2 other people have had this same problem but no formal resol…
Last reply by bri189a, -
- 2 replies
- 2.4k views
Hi, I have a Listbox on my form and I have set its Datasource to a DataView. When I try to add to this listbox I receive the following error: " Cannot modify the items collection when the Datasource property is set." Anyone know how I can solve this? Thanks, niv
Last reply by annie-r, -
- 0 replies
- 910 views
Using Visual Basic.NET, I know I can print out the contents of a Web Browser Control displaying like an HTML page. However is there a way I can add text to that print out at the top of the page. For example "hello" <-- Added text "Html document" <-- displayed in the webcontrol Any help offered is greatly appreciated.
Last reply by lothos12345, -
- 1 reply
- 914 views
I have a class that I'm using for configuration of part of my app. The serializtion and deserialization work fine. The problem I'm having is if I want to add a new property to the class that is serialized then the old xml config file will not load because now the class has more members than the serialized xml file. I've found some information on the binder memeber of IFormatter class, but this seems like overkill. I would just like it to load the values that it can and then rewrite the file when I save it after the new member is added. Easier said than done?
Last reply by qex,
-
Who's Online 0 Members, 0 Anonymous, 19 Guests (See full list)
- There are no registered users currently online