|
In fairness he is not alone; there are plenty of regulars who still will not try Google or MSDN despite one of those being the answer to nearly every query they post.
I feel your pain!
I must get a clever new signature for 2011.
|
|
|
|
|
You need to add the ImUpShitCreek and IDontHaveAPaddle interfaces.
|
|
|
|
|
That is harsh, cruel and uncalled for!
Good work, keep it up.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Hello,I'm writting a extend Webbrowser,that I hope to disable scripts in my webbrowser.Idispatch interface can make it ,but I don't know how to implement it. And I have not found some materials with c#.Can someone tell me how to implement it and implement The Invoke method?
|
|
|
|
|
WebBrowser.ScriptErrorsSuppressed = true;
This will suppress the script errors.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
I mean no script run in my webbrowser,not suppress the script errors.But thank for your answer.
|
|
|
|
|
You can't do it unless you want to disable scripts for IE itself.
When people drop a WebBrowser control on a form, then say they're writing their own browser, they are NOT writing their own browser. All you're doing is reusing Internet Explorer in your own app. All of the settings that you see in Internet Explorer (Tools -> Internet Options menu) apply to the WebBrowser object. If you modify the settings in IE, the WebBrowser object uses the same settings. So, if you disable script execution, you will also disable script execution in every instance of IE that the user also launches. Your application cannot keep its settings seperate from IE.
|
|
|
|
|
Hi,
1-
On my laptop, I have developed an application called MyApp in Visual C# 2010 Express which connects to sql server 2005 express.
Works fine.
2-
As you know there is no installation mechanism with c# 2010 express, so as a test, I copied all the files (.dll, .exe, pdb...) from the release folder and placed them into c:\program files(86)\MyApp
3-
When running the .exe in this folder, error is shown on the screen as "Login failed for user user1". Then when the continue button is clicked on the error message, the application form appears with all the controls but empty data.
4-
It seems there is a problem with the login to the sql server, BUT note that the login does exist in the sql server as the application works fine when I run it in the visual c# 2010 express environment when developing it.
5- In the application, there is a class library project (The .dll in this project) which uses the connectionstring in the app.config file.
What do y ou think the problem is please?
Thanks
|
|
|
|
|
|
Thanks for coming back to me,
but note that I have mentioned that as I use the same machine to develop the application, the application is able to login to the database when running it through the development environment i.e. when I am developing the application but it fails when the .exe is run manually.
Any thoughts on that please?
|
|
|
|
|
arkiboys wrote: Any thoughts on that please?
Personally no, so I suggest you read up on the experience others have had and published about. Error messages tend to make very good Google search sentences.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Have you tried looking in your Debug folder?
I am reasonably sure you might find your data files in there...possibly including the file you store the login information in?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
The connection string is in the settings of a class library project which is now a .dll file.
I have included this file but I get the ERROR as descrived before.
Thanks
|
|
|
|
|
That is probably because the settings are stored in a ".config" XML file.
Check all of those in your debug directory, and you will probably find it.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
Yes, I have found the config file in the debug folder and copied that also to C:\program files\AppName
But still ge tthe login failed error.
Not sure what is wrong because there is sql server and the login works as I can login using the application I have written when in the development environment.
|
|
|
|
|
arkiboys wrote: As you know there is no installation mechanism with c# 2010 express, so as a test, I copied all the files (.dll, .exe, pdb...) from the release folder and placed them into c:\program files(86)\MyApp
So you are copying on the binaries from C# and are not attempting a copy of SQL Server correct?
If yes then I would expect something is wrong with your code to do the login. As an example (only an example) you catch an exception and instead of reporting the exception error you report a failed login.
|
|
|
|
|
Correct.
I am not copying the sql server because it is already installed with the database and login.
Pleas enote that the login works through the application when connecting to the database.
|
|
|
|
|
Hei All,
Can we install any big software via C# setup application? I want to install SQL Server before my application and then create user in sql server but I dont know how can i install SQL server via setup file?
Thanks
Syed Shahid Hussain
|
|
|
|
|
|
Hei Thatraja,
Thanks u so so so so much. You dont know how big treasure u have given to me.
I'm Happy Thanks once again.
Syed Shahid Hussain
|
|
|
|
|
Best practice is that you don't do this. SQL Server is only supported as a seperate install.
Once the server is installed and running seperately, your application installer can be told which SQL Server to use and what the login credentials should be to execute a SQL script to add your users and setup the database and its security.
|
|
|
|
|
Thanks for ur reply.
I'll read the setup process completely and keep in mind ur points while developing setup project.
Syed Shahid Hussain
|
|
|
|
|
Simple answer is yes.
But, what the hell do you want to install?
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Hello all,
I have two questions.
1) I have labels and textbox.
For ex;
lblName1.Text = txtName.Text;
lblName2.Text = txtName.Text;
lblName3.Text = txtName.Text;
lblName4.Text = txtName.Text;
Is there a way that i can do that in a loop something like:
for(i=0; i<4; i++)
{
lblName[i].Text = txtName.Text; // of course it does not accept [i]
}
2) How can I find a certain type of a contol in a webform and change the controls property.
Ex; I have 10 checkboxes. without coding one by one. Is there a way that I can assign its check selected to false more proper way ;
cb1.Checked = false;
cb2.Checked = false;
cb3.Checked = false;
.
.
cb10.Checked = false;
Thanks.
modified on Friday, March 11, 2011 1:30 PM
|
|
|
|
|
1) You can do it - sort of - with reflection, but it is one heck of a sledgehammer to crap a simple nut. What you end up with will be longer than the code to do it directly, and a lot harder to read and understand.
If you really want to access a number of controls in a loop, can I suggest the simpler, elegant way of having a class level list of labels?
List<Label>myLabels = new List<Label>();
...
myLabels.Add(lblName1);
myLabels.Add(lblName2);
myLabels.Add(lblName3);
myLabels.Add(lblName4);
...
foreach (Label lab in myLabels)
{
lab.Text = txtName.Text;
}
2) Not sure what you mean here: are you trying to do the same as in (1) but for CheckBox? If so, then the same answer applies. If not, then what are you trying to do?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|