2,245 Posted Topics
Re: Download Wireshark and run the sniffer while trying to access both websites, then upload your packet logs here. [b]BE ADVISED[/b] You need to post your COMPLETE packet logs. Close every application except for Wireshark and a browser window. Start Wireshark, try to access both sites, then stop the sniffer session. … | |
Re: Right click on the table adapter and configure the queries. Step through the wizard and let it pull down the new results and it will adjust the dataset for you accordingly. If you added new columns but don't have the new columns in your SELECT statement then obviously it will … | |
Re: What do you mean "at Site B"? Is Site B a physical location or a website? You can change the DNS settings or DNS server behavior based on source request so this is possible. Please clarify what you are asking | |
Re: For an ASP label in c# code? Drop a label in the designer: [code] <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> [/code] Assign a forecolor in code: [code=c#] protected void Page_Load(object sender, EventArgs e) { Label1.ForeColor = System.Drawing.Color.Red; } [/code] | |
Re: fulcrum -- You may also consider using [icode]HttpWebRequest[/icode] to simplify what you are trying to accomplish. I realize this isn't what you asked but I thought I would mention it in case you haven't seen it before. [code=c#] private static void GetPage(string URL, string Referrer) { HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(URL); … | |
Re: Its hard to say without having a look at it but you probably want to use a struct here since math related functions across the .NET platform are structs. Take a look at the [icode]DateTime[/icode] struct. It has a number of methods (not nearly 60!) and implements a number of … | |
Re: Could you mark the generated class as abstract and create a descendant class, override the members, and mark them with attributes? This would allow you to persist your changes if the base class was regenerated. I have a few instances where I do something like this and I have a … | |
Re: Hello Kevin and welcome to daniweb! Please use code tags when you post code on the forum: To answer your question here is a code snippet from an old post: private void DoExcel() { const string Fname = @"C:\dotnetwin\daniweb\Book1.xlsx"; Microsoft.Office.Interop.Excel.ApplicationClass excel = null; Microsoft.Office.Interop.Excel.Workbook wb = null; Microsoft.Office.Interop.Excel.Worksheet ws = … | |
Re: I hate those built in controls too. First you will need to get the back. Change SqlDataReader to OracleDataReader, etc. Swap out Sql* with Oracle* [code=c#] private static DataTable LookupUser(string Username) { /* * The reason I return a datatable here is so you can also bring back the user's … | |
Re: I have to admit .. there are cases where I use handmade encryption (xor). Its not always a bad idea... Let us instead give congrats to danny for providing the solution :) | |
Re: Self imported SQL File? What is your question exactly? | |
Re: If I understand you correct then you are saying "I am paying someone to write the code for me", correct? The law works this way for software development -- The company or entity whose employees' created the software owns it unless specifically stated otherwise. They have tests for whether you … | |
Re: Is this the same issue as reported in: [url]http://www.daniweb.com/forums/thread207462.html[/url] The thread is long, this is the post: [url]http://www.daniweb.com/forums/post934322.html#post934322[/url] I have a problem uploading with IE8 where I get a browser error when I click the manage attachments buttons. It never gets to the point where the window pops up. | |
Re: Set your [icode]listView1.View = details[/icode] so you can see the column headers. Then use this code: [code=c#] private void listView1_DragEnter(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy; } private void listView1_DragDrop(object sender, DragEventArgs e) { listView1.Items.Clear(); string[] handles = (string[])e.Data.GetData(DataFormats.FileDrop, false); foreach (string s in handles) { if … | |
Re: Does the output differ on the same machine running the process at different times, or is this the result of testing on multiple machines? | |
Re: I don't understand what you're asking. Yes the URL you provide in the address bar is part of the HTTP header. Example 1 using IP: [code] Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, application/x-ms-application, application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml+xml, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Accept-Language: en-us User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; … | |
Re: Your connection string is wrong. It should be something like: [code] "Data Source={0};Initial Catalog={1};Integrated Security=False;User Id={2};Password={3}; [/code] Also you need to pass your connection to the command: [code=vb.net] cmd = New SqlCommand("select * from student", con) [/code] | |
Re: Can you post a sample project? I don't understand your problem here. You have not declared [icode]toolStripButton1[/icode] in the scope of the code you posted and i'm guessing you have a tool strip button in the class this code is in, and you are actually reflecting in to your local … | |
Re: You don't really want to do this in the constructor because then you can't create a new instance of the animal class as you are already constructing one. What you can do is create a static method that returns an instance. [code=c#] using System; using System.Collections.Generic; using System.Linq; using System.Text; … | |
Re: Use a timer to update the time every second. Set the execution interval to 1000 (1 second) and in the timer.OnTicket event have it call [icode]lblTime.Text = Datetime.Now.ToShortTimeString();[/icode] | |
Re: [icode]expr[/icode] doesn't handle decimals/floating numbers and your assignment syntax is wrong. Use [icode]var=value[/icode] without the spaces. This fixes everything but [icode]expr[/icode]. I don't know your project requirements but you will need to find another way to handle the math. Bash can handle math on its own by the way: [code=bash] … | |
Re: The problem is the procedure you are trying to use [icode]CREATE PROCEDURE [dbo].[CreateBackup][/icode] exists inside the database you are trying to restore. For a database to be restored nobody can be using it. You need to use the "master" database when issuing a restore command and you should sent it … | |
Re: Yeah I was thinking the same thing adatapost was. buyap -- You can see an example of encrypting strings on [url]http://www.daniweb.com/code/snippet1244.html[/url]. You can slightly alter that code to use streams | |
Re: I can't even read your post with all the extra line breaks and no code tags. Try posting it again: [noparse] [code=c#] ...code here [/code] [/noparse] | |
Re: What is App.Path? Are you looking for the global and user specific configuration files for your application? If that is the case look at the [icode]ConfigurationManager[/icode] class. If not then please explain what you're after in more detail | |
Re: [code=sql] CREATE PROCEDURE Stp_HexToInt @HexValue Varchar(20) AS BEGIN Declare @Query nvarchar(100) Declare @Parameters nvarchar(50) Declare @ReturnValue Int if (charindex('0x',@HexValue) = 0) Set @HexValue = '0x' + @HexValue Set @Query = N'Select @Result = Convert(int,' + @HexValue + ')' Set @Parameters = N'@Result int output' Exec master.dbo.Sp_executesql @Query, @Parameters, @ReturnValue Output … | |
Re: What are you running your service as? Some of the service accounts dont have access to networking componenets. For testing try to switch your service over to run as administrator and see if it starts working. | |
Re: Why don't you right click on your registry editor and export the registry key in question. Use notepad to open the .reg file -- it just plain text, and examine how the .reg file is setup. I understand you don't want to use regedit but you can view it once … | |
Re: Sonia: This is an SQL question you happen to have the query embedded in an ASP.NET application. Please post these question to the SQL forums in the future. To answer your question: [code=sql] IF OBJECT_ID('TestTable123', 'U') IS NULL CREATE TABLE TestTable123 ( Field varchar(10) ) [/code] [icode]OBJECT_ID('<name>', 'U')[/icode] returns the … | |
Re: The forms load event fires when the form becomes visible and the window handle is created. Please post your project so we can review. As Diamonddrake indicated you have not given us enough code to show the true problem | |
Re: It doesn't really matter. There is negligible overhead for running a DNS server. Typically Windows DNS servers are better for a windows network. | |
Re: The problem is you still have open forms. Here is the new code for Form1.cs: [code=c#] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace happybirthday { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object … | |
Re: Did you take this from the Trab project out of curiosity? And use the signature (object sender, EventArgs e). This first param for 99% of events is sender, and the second inherits from EventArgs. For the next question the only way I know you can tell which event fired is … | |
Re: The [icode]ConfigurationManager[/icode] class! You can also use the designer generated application settings file. If you use the designer generated file be sure to handle upgrades by adding a value called "upgraded" with a default value of false. When you initialize the application call an upgrade (in Program.cs before Application.Run(): [code=c#] … | |
Re: You didn't post enough code to indicate what the problem is here. Please post enough code where we can compile and see the error. Anyway i'm not sure what your code is calling but when it comes to controls and updating the GUI that must be done on the main … | |
Re: Lock what? A file? A license key to "lock" the application after a demo period expired? I don't understand what you are asking... | |
Re: welcome to daniweb jay! For your future post please use code tags when you are pasting code to the forum: [noparse] [code=c#] ...code goes here [/code] [/noparse] adatapost got it :) I removed my code, wrong approach | |
Re: Do you have to do this at runtime? You could embed notepad.exe in your project. This seems like a bad idea. Also I don't believe you can just append data wherever you want in an executable so are you sure this concept works? I know you can declare a static … | |
Re: pete, Please use code tags when pasting code: [noparse] [code=c#] ..code here [/code] [/noparse] Also please follow up with your old threads. I answered your original question in the thread [url]http://www.daniweb.com/forums/thread205618.html[/url] and suggested another way for image loading. Please mark your threads as solved if your question was answered if … | |
Re: Can you do something like: [code=c#] private void button3_Click(object sender, EventArgs e) { const string word = @"hello"; string[] lines = System.IO.File.ReadAllLines(@"C:\File.txt"); foreach (string s in lines) { string[] lineWords = System.Text.RegularExpressions.Regex.Split(s, @"\W+"); for (int i1 = 0; i1 < lineWords.Length; i1++) { if (string.Compare(lineWords[i1], word, true) == 0) { … | |
Re: This works fine: [code=c#] [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect); [StructLayout(LayoutKind.Sequential)] public struct RECT { public int Left; public int Top; public int Right; public int Bottom; } private void button1_Click(object sender, EventArgs e) { RECT rct; bool b = GetWindowRect(this.Handle, out rct); System.Diagnostics.Debugger.Break(); } … | |
Re: Please see these threads for information on using parameters: [url]http://www.daniweb.com/forums/thread191241.html[/url] [url]http://www.daniweb.com/forums/thread198304.html[/url] You should use parameterized queries. It makes your code easier to read, is less security risk, and has better performance: [code=c#] private void simpleButton1_Click(object sender, EventArgs e) { const string query = "Insert Into aTable (aString, aDateTime) Values (@aString, … | |
Re: I think your encoding is incorrect. Here is an example I found while looking around if you want to specify encoding: [code=c#] string pdfpath = e.CommandArgument.ToString(); Response.Clear(); Response.Charset = "utf-8"; Response.Buffer = true; this.EnableViewState = false; Response.ContentEncoding = System.Text.Encoding.UTF8; Response.ContentType = "application/pdf"; Response.WriteFile(pdfpath); Response.Flush(); Response.Close(); Response.End(); [/code] I don't actually … | |
Re: [code=dos] C:\Documents and Settings\scott.SCOTTIE>cd \ C:\>dir /s > allFiles.txt C:\> [/code] Without the prompt: [code=dos] cd \ dir /s > allFiles.txt [/code] | |
Re: Try going in to the BIOS before the system boots and disabling your second drive. This won't do anything to fix the problem but might help indicate if you have a hardware problem with the drive. I doubt this is the problem since you're at least getting to the XP … | |
Re: Do you only want one Form2 to open? Or do you want to Form2 to be shown modally...? What is the desired behavior? | |
Re: I don't either. Danny: are you running express or full? I'm running the full version. | |
Re: I don't know what eCommerce concepts has to do with the "current global situation" but: [url]http://tinyurl.com/l4tlqk[/url] | |
Re: [code=sql] ALTER PROCEDURE [dbo].[sp_Constraints_Update] @xml ntext, @TTBLType varchar(5) [/code] According to this the arguments are 1) XML 2) Table Type [code=sql] exec sp_Constraints_Update 'EXAM','<XML DATA>' [/code] I think you have the parameter order backwards |
The End.