|
|
Hello,
can anyone illustrate a step by step procedure for using resource manager or some equvalent in C#.
I am not able to embed the main assembly resource file, .resources, in
the executable assembly.So please guide me in creating and embedding resource files as well.
Keshav Kamat
India
|
|
|
|
|
Look around on this site, there are some articles on embedding resources into assemblies.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Some of the functionalities can't write in .net easily, where as possible in C, C++, VC++. So how to use those libraries in .NET (C#).
|
|
|
|
|
|
Hi,
I have created a DLL in dotnet and it accepts one parameter i.e string.
When i call the method of the dll it throws me following error:
Error Type:
Microsoft VBScript runtime (0x800A01C2)
Wrong number of arguments or invalid property assignment: 'display'
/project/usedll.asp, line 46
Please suggest.
Pavas
|
|
|
|
|
How are you calling the method in that dll ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
'Below is the code in ASP file. I am sending a int value
Dim Obj
int i
i=2
Set Obj = Server.CreateObject("ClassLibrary1.Class1")
response.write Obj.methodname (i)
Pavas
|
|
|
|
|
But you sending the int instead of string ...
mpavas wrote: Obj.methodname (i)
Check the argument that the method is expecting
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I tried sending both and Int and String. Both of them resulted in an error
The method detail in C#
public int PostCreate(int key)
{
return key;
}
Pavas
|
|
|
|
|
Let me reframe. This dll is created in .NET and I am using it in ASP. The dll works fine with out parameters.
Pavas
|
|
|
|
|
Hello,
Which are the faster functions in order to read/write a file?
I must write string in a file in a cycle and must be fastest possible!
Thanks a lot.
Alex
|
|
|
|
|
1) Have you meassured a performance problem or are you simply expecting it? Unless you do something strange I doubt you will notice any performance differences between the various ways of writing to files.
2) If you have performance problems are you sure it is not in the disk IO system instead of your code? If it is, get faster disks or more memory for diskcache, or start collecting changes in memory and write them in batches (possible on a worker thread, but then you must take care of locking etc).
Besides this it is not easy to help you when you do not provide more information on what you are trying to write and for what purpose.
|
|
|
|
|
does somebody knows where can i get a maskedtextbox that can support transparent background
-TheCardinal
|
|
|
|
|
Hi
I am busy going through netron application so i want to know if is possible to save netron graphs as an xml and how.i have gone though it several times but i can figure it out as is too complex.
Mamphekgo
|
|
|
|
|
mamphekgojakes wrote: i want to know if is possible to save netron graphs as an xml and how
Possibly, but since I don't know what a netron graph is I can't help much. Perhaps if you explained what one is.
|
|
|
|
|
Which version of Netron? Unloaded, Unfold, new Netron, old Netron?
Off the top of my head, I can't remember if Netron ships with an XML serializer, but if it doesn't then one way that you could do it is to iterate through the Shapes collection of the graph and write out the attributes from the serialization context.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
OK - then you are probably going to have to write your own code I'm afraid. Basically, you will need to iterate through the shape collection building up the shape Xml document as you go.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
How does one go about creating a login window using C#.
|
|
|
|
|
For that u have to use database connection
I think this code will help u......
<br />
SqlConnection MySchool;<br />
MySchool= new SqlConnection("server=(local);database=MySchool;integrated security=sspi");<br />
MySchool.Open();<br />
String selectCmd = "select * from signin where vusername='"+Txtuname.Text+"'";<br />
SqlCommand MyCmd = new SqlCommand(selectCmd,MySchool);<br />
SqlDataReader dr;<br />
dr=MyCmd.ExecuteReader();<br />
while(dr.Read())<br />
{<br />
if((String.Equals(dr.GetString(0).Trim(),Txtuname.Text.Trim()))==true)<br />
{<br />
if((String.Equals(dr.GetString(1).Trim(),Txtpassword.Text.Trim()))==true)<br />
{<br />
Response.Redirect("New_Page.aspx");<br />
}<br />
else<br />
{<br />
Lblmsg.Text="Error:Password is wrong.";<br />
}<br />
}<br />
else<br />
{<br />
Lblmsg.Text="Error:Username is wrong";<br />
}<br />
}<br />
<br />
:)<br />
<br />
<br />
<br />
|
|
|
|
|
Storing passwords unencrypted in the database...
Are you sure that's a good idea?
Better to encrypt the passwords using a hash, then hash the login password supplied and compare it against the hashed password for the user in the DB.
Paul
|
|
|
|
|
pmarfleet wrote: Storing passwords unencrypted in the database...
That is really bad. I cannot believe people do that
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Are you NUTS!
The password is unencrypted, as the other posted has indicated, AND your code is susceptable to a SQL Injection Attack.
Also, you are accessing the columns by ordinal position so the code will break if you change your database design because you are using SELECT *.
Please learn about and protect yourself from SQL Injection Attacks.
SQL Injection Attacks and Tips on Hot to Prevent Them[^]
|
|
|
|
|
The normal way of doing this is to create a form that is called before you create the MainForm. If the user successfully logs in, then you do the Application.Run(new MainForm()) section.
Remember though, that you'll probably want to save the password encrypted, so your login code will need to check the encrypted versions.
Deja View - the feeling that you've seen this post before.
|
|
|
|