|
ghumman63 wrote: Response.Redirect ("Employee.aspx?id= "+ this.DropDownList1.SelectedValue + "?name=" + this.TextBox1.Text);
Use an ampersand (& ) symbol to append the fields after the first one as follows:
Response.Redirect ("Employee.aspx?id= "+ this.DropDownList1.SelectedValue + "&name=" + this.TextBox1.Text);
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Thats what i too have mentioned it.
Regards,
Satips.
|
|
|
|
|
Dear Satips,
See the time delay between you and me.
This shows that we are in the same wavelength.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
yeah i didn't notice the time. Ok.
Regards,
Satips.
|
|
|
|
|
Hello everyone,
I'm starting to work on a project. This project will incorporate so many components from previous work of another colleague. He did all his work in a separate project. Basically,I'm trying to
do a wizard-based version of hsi work with screens and neat menus and so on. I was wondering how I can use functions and events that he programmed into my project without having to hard-code or copy code into my own project.
For example, I want to call an event function from his work when i click a "next" button in my project.
I hope the questions is clear enough. and Thanks for any help. It will be much appreciated.
|
|
|
|
|
Recompile his code as a dll/dlls.
Now include reference those dlls in your code.
You might have to make some minor changes to compile it as a dll. (All this on the assumption that his code is currently compiled to an executable, you have good understanding of his code)
rAm
i Think, i Wait, i Fast -- Siddartha
|
|
|
|
|
Hi guys, whats up ? How can I change the Input Language From English to Farsi Or other languages, a friend told me to use this code (This is a delphi ample)
LoadKeyboardLayout('0000040c', KLF_ACTIVATE);<br />
Application.BiDiKeyboard := '0000040c';
Does the same code works in C#, if so where can I get a sample? Please help me out !
Thanx
Mr.K
|
|
|
|
|
|
Hello Everybody,
In my program i have to encrypt the password and i have to store it in the SQL server database.
It should by very strong.
Could you please give me a hint
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
The Cryptography namespace is full of options. MD5 is definately not a secure option, FWIW.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you Christian.
What do you mean by FWIW, is it a encryption method. plz don't mistake me
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
For What It's Worth = FWIW
Use SHA256 - that's pretty strong - we use it in my company (note I'm not saying WHICH company)
Mark
|
|
|
|
|
Thank you for your kind suggesstion
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Mark Greenwood wrote: we use it in my company (note I'm not saying WHICH company)
Most companies use this I suspect - as it is very easy to use and very strong. Usually with a strong password as well.
|
|
|
|
|
When i tried and go through the SHA256 algorithm i felt it is very difficult to implement and they have used it for encrypting the files but i have to get a password from the user and i have to encrypt the password and i have to store it in the database.
Please give me your suggestions because i am new to this concept
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
I'm having difficulty returning a nested object through a WCF service. A nudge in the right direction would be much appreciated! Here's what I'm doing:- I have 2 data contracts (classes
Foo and Bar ) defined thusly:
[DataContract]
[Serializable]
public class Foo
{
[DataMember]
public string FooData;
[DataMember]
public Bar TheBar;
}
[DataContract]
[Serializable]
public class Bar
{
[DataMember]
public string BarStringData;
[DataMember]
public int BarIntData;
} - My service consists of a single operation:
[ServiceContract()]
public interface IMyService
{
[OperationContract]
Foo GetFoo();
} GetFoo() is implemented as:
public Foo GetFoo()
{
Foo f = new Foo();
f.FooData = "foo";
f.TheBar = new Bar();
f.TheBar.BarStringData = "bar";
f.TheBar.BarIntData = 42;
} - When the service is invoked, it returns a
Foo object that contains a Bar object. However, the properties of the Bar instance aren't returned - its BarStringData is null and its BarIntData is zero. Any idea what I'm doing wrong?
/ravi
|
|
|
|
|
Try making TheBar, BarStringData and BarIntData properties instead of fields.
Can you also try an operation like GetBar(<some values="" for="" bar="" fields="">) to verify the corectness of the Bar object (before turning fields in properties and after...)
Horia Tudosie
|
|
|
|
|
Actually they are already properties. (I omitted that to keep the post short). The Bar object is correctly being constructed on the server.
/ravi
|
|
|
|
|
Hi all,
I've been stuck for the last two days on quite a strange problem. Here's what's happening: I'm calling a C++ function defined in some dll. Some of the parameters in the function are defined as 'out'. The problem that I am facing is with the out parameters, some of the data is 'lost' in transition.
Perhaps some code will help. The following is the C# wrapper function:
[DllImport("SomeDll.dll", EntryPoint = "SomeFunction")]<br />
private static extern bool SomeFunction(<br />
[MarshalAs(UnmanagedType.LPStr)] string str1,<br />
[MarshalAs(UnmanagedType.LPStr)] string str2,<br />
[MarshalAs(UnmanagedType.LPStr)] string str3,<br />
[MarshalAs(UnmanagedType.LPStr)] string str4,<br />
long longNum,<br />
out SomeStruct dataStruct,<br />
out int int1,<br />
out int int2);<br />
And this is the prototype of the C++ function that is being called:
BOOL SomeFunction(<br />
const char* str1,<br />
const char* str2,<br />
const char* str3,<br />
const char* str4,<br />
const long longNum, <br />
SomeStruct* dataStruct,<br />
int& int1,<br />
int& int2)<br />
When I step through the C# code, I find that the dataStruct structure is returned as 'null' (i.e. all values zeroed). The value of int2 is being returned correctly but in the 'position' of int1. The int2 that is returned is unchanged from before the function was invoked. I.e. if I expect to get 5000 from int2, int1 would instead give me that value of 5000 and int2 would be unchanged.
When I step through the C++ code, I find that the dataStruct structure is being received as null from the C# caller but the two ints are set to the correct values before the routine finishes.
The four strings and the long are passed in without any problems.
Based on what I see with the null structure (it should not be observed as being null on the C++ side as it had already been allocated some memory in the C# side of things) and the strange behaviour of int1 and int2, my guess is that the problem lies in how the parameters are being 'wired up'. Unfortunately, I can't see where I've screwed up (the SomeStruct structure is used in other routines in almost exactly the same way and works fine there).
Would appreciate any ideas/comments.
cheers!
|
|
|
|
|
jozsurf wrote: the SomeStruct structure is used in other routines in almost exactly the same way and works fine there
almost is the operative word I guess.
The symptoms you describe correspond to a problem with stack offsets, due to the
fact SomeObject is handled differently by both sides.
Your C function seems to output a pointer to some "SomeStruct". The wrapper function
needs to know how to convert such pointer into a "SomeStruct" itself.
You did not show the definition of SomeStruct; it probably needs some marshaling attributes.
Alternatively you could accept the pointer (have IntPtr in the prototype) and do the
conversion yourself, maybe using Marshal.PtrToStructure
|
|
|
|
|
Thanks for your reply Luc,
I tried using an IntPtr to get the pointer back (don't actually need to use the struct, just want to marshal the parameters correctly as I need the two ints at the end of the parameter list) but wasn't too successful. Unfortunately the values returned were same as before.
Nevertheless, you've given me a bit more food for thought; I've got a couple more things I can explore to get this going. I don't suppose you (or anyone else) could recommend a good learning resource for doing marshalling/interop stuff? I find that I'm wasting a lot of time doing things by trial and error and learning bits and pieces along the way...
cheers!
|
|
|
|
|
Hi,
lots of prototypes can be found on www.pinvoke.net
apart from that I discovered how to do what I needed by trial and error, I have no
definite tutorial or so.
best seems to experiment with own code on both sides (C# and C) so one can experiment
at will, and log everything.
Later on I also discovered there are quite a lot of articles on CodeProject that
use PInvoke...
BTW: you are not having trouble with Win64 are you ? (If you build one side with
64-bit pointers, so must be the other).
|
|
|
|
|
Hi,
I didn't get the e-mail notification for your last post, Luc! I came on to post the solution and just saw it...if I had read it, I possibly could have arrived at the solution much sooner.
Unsure if this was the situation you meant with the 64 bit pointers, but the problem was to do with the difference in definition of C#'s long (a 64 bit int) and C++'s long (a 32 bit int). Equating the two data types to be the same (as I was doing) was pushing the stack out of alignment.
cheers!
|
|
|
|
|
Yes, both Java and C# have real longs, twice the size of an int (as opposed to the
"long is at least as capable as int" in C and C++).
Tho that was not what I was hinting at; some people have difficulty combining
Win32 and Win64 code (having 4B and 8B pointers).
|
|
|
|
|
Hello,
Is there a way to display a custom image within a messageBox? Traditionally you would load custom text, but what about an image?
Thanks in advance!
Mr. O
|
|
|
|