2,245 Posted Topics

Member Avatar for caveman20

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. …

Member Avatar for sknake
0
582
Member Avatar for SusanHAllen
Member Avatar for Brick

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 …

Member Avatar for sknake
0
248
Member Avatar for ambers

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

Member Avatar for ambers
0
31
Member Avatar for anuj_sharma

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]

Member Avatar for mail2ranjan
0
225
Member Avatar for fulcrum9

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); …

Member Avatar for fulcrum9
0
232
Member Avatar for ddanbe

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 …

Member Avatar for ddanbe
0
125
Member Avatar for jure.gregorin

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 …

Member Avatar for kvprajapati
0
97
Member Avatar for kevin.cochrane

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 = …

Member Avatar for kevin.cochrane
0
522
Member Avatar for robertmacedonia

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 …

Member Avatar for robertmacedonia
0
147
Member Avatar for swinefish

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 :)

Member Avatar for swinefish
0
288
Member Avatar for phantom1000000
Member Avatar for Media2823

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 …

Member Avatar for sknake
0
156
Member Avatar for crunchie

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.

Member Avatar for sknake
0
303
Member Avatar for papanyquiL

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 …

Member Avatar for papanyquiL
0
825
Member Avatar for lehe

Does the output differ on the same machine running the process at different times, or is this the result of testing on multiple machines?

Member Avatar for sknake
0
262
Member Avatar for azza85

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; …

Member Avatar for sknake
0
202
Member Avatar for ravikiran032

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]

Member Avatar for sknake
0
136
Member Avatar for Salizer

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 …

Member Avatar for sknake
0
93
Member Avatar for Annex31b

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; …

Member Avatar for sknake
0
163
Member Avatar for arunkumars

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]

Member Avatar for S2009
0
134
Member Avatar for herms14

[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] …

Member Avatar for sknake
0
93
Member Avatar for pee2002

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 …

Member Avatar for sknake
0
99
Member Avatar for buyap

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

Member Avatar for sknake
0
137
Member Avatar for elidotnet

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]

Member Avatar for elidotnet
0
196
Member Avatar for Mortez Maya

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

Member Avatar for Mortez Maya
0
760
Member Avatar for KRichardson1127

[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 …

Member Avatar for sknake
0
100
Member Avatar for Merovingian

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.

Member Avatar for Merovingian
0
396
Member Avatar for fallopiano

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 …

Member Avatar for fallopiano
0
396
Member Avatar for sonia sardana

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 …

Member Avatar for sonia sardana
0
115
Member Avatar for wingers1290

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

Member Avatar for wingers1290
0
142
Member Avatar for shakil_diit

It doesn't really matter. There is negligible overhead for running a DNS server. Typically Windows DNS servers are better for a windows network.

Member Avatar for shakil_diit
0
204
Member Avatar for chathuD

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 …

Member Avatar for sknake
0
107
Member Avatar for Nogat21

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 …

Member Avatar for sknake
0
445
Member Avatar for lqdo

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#] …

Member Avatar for lqdo
0
348
Member Avatar for swinefish

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 …

Member Avatar for swinefish
0
132
Member Avatar for zhinokin

Lock what? A file? A license key to "lock" the application after a demo period expired? I don't understand what you are asking...

Member Avatar for zhinokin
0
115
Member Avatar for jayneben

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

Member Avatar for ddanbe
0
310
Member Avatar for FTProtocol

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 …

Member Avatar for sknake
0
248
Member Avatar for pete08

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 …

Member Avatar for pete08
0
422
Member Avatar for db11

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) { …

Member Avatar for db11
0
175
Member Avatar for AndrewP7

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(); } …

Member Avatar for AndrewP7
0
828
Member Avatar for ejazmusavi

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, …

Member Avatar for arunkumars
0
1K
Member Avatar for sivak
Re: pdf

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 …

Member Avatar for textbox
0
98
Member Avatar for maheish

[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]

Member Avatar for sknake
0
15
Member Avatar for Rocket2009

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 …

Member Avatar for sknake
0
155
Member Avatar for wingers1290

Do you only want one Form2 to open? Or do you want to Form2 to be shown modally...? What is the desired behavior?

Member Avatar for wingers1290
0
123
Member Avatar for ddanbe
Member Avatar for lighthead
0
136
Member Avatar for chrishi

I don't know what eCommerce concepts has to do with the "current global situation" but: [url]http://tinyurl.com/l4tlqk[/url]

Member Avatar for bobchrist
0
93
Member Avatar for vuyiswamb

[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

Member Avatar for vuyiswamb
0
580

The End.