Still don't get what it is you want to achieve. You have two textboxes: one representing a name and the other represents age. You want to display the name and the age in a listbox - I assume this is not causing you any problems? You say you have a for-loop "to get multiple inputs". What do you mean by this? Perhaps you better post the code that doesn't work..
Calla
Posts
-
please clear this doubt -
please clear this doubtCould you please elaborate on what you mean by "get multiple inputs in textbox at run time".
-
How to insert,update and edit data in datagridview window form -
Troubles with calling a PageMethod from javascript [solved]Today I finally found what was the cause of this behaviour - and fixed it. It turned out I was missing the following lines in my
web.config file: Hopefully this might help someone else who gets stuck with this problem :)
-
Troubles with calling a PageMethod from javascript [solved]I've been struggling with the same problem for a few days now without getting anywhere. In my aspx page I try to call a PageMethod from a javascript and then inserting the result of that call into a div. MyPage.aspx
<ajaxToolkit:ToolkitScriptManager runat="server" ID="ScriptManager1" EnablePageMethods="true">
<Scripts>
<asp:ScriptReference Path="~/javascript/myscript.js" />
</Scripts>
</ajaxToolkit:ToolkitScriptManager>
...
...
<a href="javascript:myFunction();">Click to run script</a>
...
...
<div id='theDiv'></div>MyPage.aspx.cs
[System.Web.Services.WebMethod]
public static string ReturnTheString()
{
return "This is the string returned";
}And finally my javascript function where everything goes wrong myscript.js
function myFunction()
{
PageMethods.ReturnTheString(OnSucceeded, OnFailed);
}function OnSucceeded(result)
{
var myDiv = document.getElementById('theDiv');
myDiv.innerHTML = result;
}function OnFailed(error)
{
alert(error.get_message());
}The problem is that I don't get the expexted "This is the string returned" as result in my OnSucceeded js function. And when I debug my website and set up a breakpoint in ReturnTheString() the code never runs.. My result parameter is sometimes just empty and sometimes has the value of almost my whole page (starting with
-
EKRN.EXEHave a look at this link
-
hi frndsIf you want to add a forum feature I assume you're talking about web development and therefor this question would be more suitable in the ASP.NET forum. On the other hand, your questions is not very specific so my advice is to do some reading/googling and when you're stuck on a more *real* problem - that is when you post something here. Good luck.
-
Manchester United announce new sponsorship deal:laugh:
-
Debugging the Dll build in Debug modeAssuming you use Visual Studio you can right click your DLL-project and choose Properties. Under the "Debug" section you can choose an external program to be launched as a start action - a program that uses your DLL. Another simple way would be to just add for instance a Console project to your solution, add the DLL project to References and then start that program. If you don't use Visual Studio, and your IDE doesn't support the first method described above, you could still use the second method for debugging. Good luck!
-
Setting multiple environment variables for a Process objectI see. Thank you for pointing that out!
-
Setting multiple environment variables for a Process objectThank you for your reply. I know that environment variables are used by shell and not
Process
per se, but as you saw in the example I need to start a cmd process and set more than one variable. I don't think using theEnvironmentVariables
property ofProcessStartInfo
will work since it seems to be readonly according to MSDN. Anyway, it works with the previous suggestion (with a slight correction) as shown below./K SET MYVAR1=HELLO && SET MYVAR2=WORLD
-
Setting multiple environment variables for a Process objectThanks Dave, I'll try that when I'm back at the office.
-
Setting multiple environment variables for a Process objectIn a C# application I create a
Process
object and asProcess.StartInfo.Arguments
I set an environment variable like this:Process p = new Process();
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.Arguments = @"/k SET MYVAR1=HELLO";
p.Start():But know I need to add another environment variable also valid for the cmd.exe process. The process object needs to pass a second variable called
MYVAR2=WORLD
. But theStartInfo.Arguments
is just astring
and if I try something like this:...
p.StartInfo.Arguments = @"/k SET MYVAR1=HELLO MYVAR2=WORLD";
...it doesn't work since
MYVAR1
then gets the value:HELLO MYVAR2=WORLD
. Does anyone have a clue on how to achieve this? -
WCF problem when changing client proxy credentials (The network logon failed) [solved]Yes that was actually all it took.. I'm not really sure of how the Simple File Sharing works, but it seems that if you have it turned on - allowing users within your network to access shared folders without any authentication - you run into problems when you try to access that machine USING a username and password. I've heard about other people running into this issue whenver they try to do something similar.
-
WCF problem when changing client proxy credentials (The network logon failed) [solved]Problem solved. Turned OFF "Simple File Sharing" :doh:
-
WCF problem when changing client proxy credentials (The network logon failed) [solved]I'm experiencing difficulties when I try to connect to my WCF Server (hosted as an NT Service) on a Windows XP x64 using my client proxy with another user than the one logged on to the machine. The error message I get from the server is: "A remote side security requirement was not fulfilled during authentication. Try increasing the ProtectionLevel and/or ImpersonationLevel. The network logon failed" I have compiled the code explicitly for the x64 platform and for the x86 platform - in other words it's not compiled for AnyCPU. If I run the server on a Windows XP x86 system it works fine - though I'm not sure this is a 32/64 bit problem. The firewall is disabled on all systems. The user should be able to enter other credentials (such as username and password) matching an existing user on the server and then make a connection - but this always fails eventhough the username and password IS correct (I double and tripple checked). My client code for using other client credentials looks like this:
static void Main(string[] args)
{
ProxyClient pxQ = null;
string adr = "net.tcp://10.222.333.444:18888/Service1"; //The IP address is correct, though I used a fake one in this example //
EndpointAddress endpoint = new EndpointAddress(adr);
NetTcpBinding binding = new NetTcpBinding(SecurityMode.Transport); //cannot use SecurityMode.None due to other restriction //
binding.Security.Message.ClientCredentialType = MessageCredentialType.Windows;pxQ = new ProxyClient(binding, endpoint);
pxQ.ClientCredentials.Windows.ClientCredential = new NetworkCredential("NormalUser", "normal"); // use other credentials //
pxQ.Open(); //This failsConsole.WriteLine(px.GetData(42));
}On the server side it looks like this: ...
ServiceHost svcHost = null;
Service1 svc1 = new Service1();
Uri uri = new Uri("net.tcp://localhost:18888/Service1");
svcHost = new ServiceHost((Object)svc1, uri);NetTcpBinding netTcpBinding = new NetTcpBinding(SecurityMode.Transport);
netTcpBinding.ReceiveTimeout = new TimeSpan(0, 30, 0);netTcpBinding.Security.Transport.ClientCredentialType = TcpClientCredentialType.Windows;
svcHost.AddServiceEndpoint(typeof(IService1), netTcpBinding, uri);
svcHost.Open();... The server starts without any errors. What am I missing in regards of the authentication, and why does it work on my x86 system? Are there different default settings on x64 and x86 Windows XP. Any suggestions are highly appreciate
-
WCF programming bookI used "Programming WCF Services" by Juval Löwy (published by O´Reilly). I believe it's a real good book to get started and it uses simple examples and clear explanations (on the other hand I am about to post a question in this forum regarding something that doesn't work.. :sigh: ).
-
SendKeys.SendI don't want you to send me your program and really doubt anyone else in here want that either. You can't expect people to do that kind of work for you - and I still believe asking for it is rude and should be avoided. My guess is people will be less interested in helping you if you use that approach.
-
SendKeys.SendSeriously you don't expect him to sit down en debug your program? :wtf: Suggesting that is quite rude if you ask me. Do this the right way: provide the code snippet that doesn't work and let people here have a look at it.
-
Accessing a WCF service over LANGreat! :)