|
Got it. cast the sender object then use .Text. Think I have been at this too long
Cheers,
Colin
|
|
|
|
|
I need help in this problem. So, anybody please help. It is urgent.
I have a user control which is docked inside a panel, and a Form. The user control contains an unbounded datgridview control. the Form open with a button on usercontrol. The Form contains few textboxes and a button. On button's click event, The textbox values should be saved inthe usercontrol's datagridview as a row.
I have tried it through delegate also, but, it runs with no errors and no data in datagridview. Please help.
|
|
|
|
|
I have same thing I do this
<%@ Reference Control="~/UserControls/a.ascx" %>
on button click
Dim objHeader As UserControls_a = Page.Master.FindControl("a")
If Not IsNothing(objHeader) Then
objHeader.UpdateCartItemCount()
End If
|
|
|
|
|
Thanks Hardik:
But it is related to ASP.Net and I am developing a windows based application.
Will you please be more specific.
Thanks.
|
|
|
|
|
In Window XP with Sp2, how can we block WiFi, BlueTooth , Serial and ll port?
Vijay Negi
|
|
|
|
|
Hi Brothers,
Yara I am working in C#. I want to read an excel file and put that read data into my database( in access).
Data in written like:
1 ## SUMMARY GP-GS Min FG% 3PT% FT% R/G A/G STL BLK PTS/G
2 -----------------------------------------------------------------------------
3 42 Horford, Al......... 16-16 28.8 .570 .000 .606 9.2 2.5 16 31 13.4
4 02 Brewer, Corey....... 16-16 30.6 .454 .295 .662 4.6 3.1 32 5 12.4
5 11 Green, Taurean...... 16-16 34.8 .381 .360 .886 2.1 3.0 18 1 12.2
Plzz tell me how can i get these records and place in a table having 12 columns(one column for each above column)
|
|
|
|
|
Do you want C# code to do this?
If not you can use import option in the Access.
Regards,
Arun Kumar.A
|
|
|
|
|
yes I want C# code. or some idea that how can i do this.
|
|
|
|
|
Microsoft offer Office interop libraries so you can call excel. Passing data into Access is trivial and well documented on the web.
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 )
|
|
|
|
|
HI,
it is possible to print the content of an object panel, as an example a design?
Thanks
Alex
|
|
|
|
|
Hi.
Do you have any idea of how could the path to the exe file of an installed application(like MS Words or Adobe Reader) be found?
Thanks.
|
|
|
|
|
If it has a file type associated with it ( like doc or pdf ), then you can find it in the registry. That's how windows knows how to open a file when you double click on it.
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 )
|
|
|
|
|
Hi,
This is my first post, so please excuse my poor english or if I miss giving you important info.
I need to start a windowless exe file from an internal website. I have been using System.Diagnostics.Process with credentiels and without. If I use it with credentiels I get a "The application failed to initialize properly (0xc0000142)." error and without I get different sort of errors from the application I am trying to start.
The exe I want to start is written in C# (as is the website), and I have the sourcecode for the exe.
The website and the exe file is running on the same machine (a 2003 server). The exe is also running every night by a scheduled task. I have been trying to start the scheduled task aswell, but hit a dead rock there aswell...
Does anyone have a good formula for doing this? As this is on an internal website the security issues are less crusial (but still important).
Best Regards
Caroline
|
|
|
|
|
Caroline Ledin wrote: As this is on an internal website the security issues are less crusial (but still important).
Statistically, most computer crime is an inside job. Therefore, logically, more emphasis should be put on security for internal applications. But that rarely happens.
Caroline Ledin wrote: I get different sort of errors from the application I am trying to start.
What is the error?
Also, remember that if you start the process from the web application you will be using the same credentials as the web application, usually the ASPNET account. Could it be that the application requires more rights to operate than the ASPNET account permits?
Caroline Ledin wrote: The exe is also running every night by a scheduled task. I have been trying to start the scheduled task aswell, but hit a dead rock there aswell...
Are there any error messages from that scenario?
|
|
|
|
|
The error's I get from the application is
1.System.Security.SecurityException: That assembly does not allow partially trusted callers
When I got this error, I added the ASP-user to the security tab of the exe file.
After that I got the next error message:
2.An unhandled exception ('System.IO.FileLoadException') occurred in BankService.exe
And I was stuck again...
When I run the Scheduler task option I did the following
exeProcess.StartInfo.FileName = "schtask";
exeProcess.StartInfo.Arguments ="/run /tn BankService";
and
exeProcess.StartInfo.FileName = "cmd";
exeProcess.StartInfo.Arguments ="schtask /run /tn BankService";
It didnt do anything...
I checked the scheduler and nothing had happened and I checked the Task manager and no process with the bankservice had started.
The exe im trying to start I have stripped from doing anything but Console.WriteLine and EventLog.WriteEntry.
In the webconfig file it is added (not due to this)
<identity impersonate="true" userName="xxxx" password="yyyy"/>
How do I set the asp net user to access the desktop or can I get the process to run as antoher user but the net user?. The website requires you to log in with your windows credentiels...
/Caroline
|
|
|
|
|
Caroline Ledin wrote: windowless exe file
Sounds like what you need to do is write it as a service, I'm pretty sure you can set up a service to be called from an ASP.NET app.
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 )
|
|
|
|
|
if that is a .net exe then add it in GAC. with "gacutil -i exe_path"
then give full trust to it with "caspol -af exe_path" use sdk command prompt.
Add this in webconfig.
<identity impersonate="true"/>
try ur program after that.
|
|
|
|
|
sorry for the late reply, but had to try/fix a few things to get it all working.
I have installed the exe with the gacutil tool and had to strong name type it first...
Then when I try the caspol command I get an error
Usage: caspol <option> <args> ...
any suggestions on this error?
I hate to be forced to make a service out of this....
Thanks for the help by the way
/Caroline
|
|
|
|
|
Made the service and is stuck on yet another access denied problem...
When I try to start the service
myControl = new ServiceController("StartSchTask");
String[] args;
args = new String[2];
args[0] = "BankService";
args[1] = "cl@ikaros.se";
myControl.Start(args);
I get the "Cannot start service StartSchTask on computer '.'." error and I believe that this is an access denied error....
any suggestions...*banging head into the wall...*
/Caroline
|
|
|
|
|
hi i keep getting this error:
Type System.DelegateSerializationHolder and the types derived from it (such as System.DelegateSerializationHolder) are not permitted to be deserialized at this security level.
below is my code and yes i am trying to do remoting combined wit delegate.
please help me if you can ,thx.
i read about this something http://www.codeproject.com/useritems/RemotingEvent.asp[^]
but i dont use configuration file so how can i set the <formatter ref="soap" typeFilterLevel="Full" />
using System;<br />
<br />
class DelegateDemo<br />
{<br />
delegate String DelegateAbc(String txt);<br />
<br />
public String TestAbc(String txt)<br />
{<br />
Console.WriteLine(txt);<br />
return "Hello from TestAbc";<br />
}<br />
public static String TestStatic(String txt)<br />
{<br />
Console.WriteLine(txt);<br />
return "Hello from TestStatic";<br />
}<br />
static void Main()<br />
{<br />
DelegateDemo t1 = new DelegateDemo();<br />
DelegateAbc d1 = new DelegateAbc(t1.TestAbc);<br />
Console.WriteLine(d1("First call"));<br />
d1 = new DelegateAbc(DelegateDemo.TestStatic);<br />
Console.WriteLine(d1("Second call"));<br />
<br />
cow asdd = new cow();<br />
asdd.setter();<br />
Console.ReadLine();<br />
}<br />
<br />
<br />
<br />
public class moo<br />
{<br />
string data;<br />
<br />
Delegateking abc;<br />
public moo(Delegate lol)<br />
{<br />
abc = (Delegateking)lol;<br />
}<br />
public void set()<br />
{<br />
abc();<br />
}<br />
}<br />
delegate void Delegateking();<br />
public class cow<br />
{<br />
<br />
<br />
moo hihi;<br />
public cow()<br />
{<br />
<br />
Delegateking lala = new Delegateking(this.setter);<br />
hihi = new moo(lala);<br />
}<br />
public void setter()<br />
{<br />
Console.WriteLine("power");<br />
}<br />
}<br />
}
-- modified at 5:08 Friday 11th May, 2007
|
|
|
|
|
I have set my dataconfig file for DB connection using Enterprise Library.
Now i want to use the one of the DBinstance for my Crystal reports connection info.
How can access the dataconfig file from my C# class to obtain the value...
Thanks in Advance
Hema S
|
|
|
|
|
Managed to find.
Any one looking for the same soln here it is..
DatabaseSettings databaseSettings =(DatabaseSettings)ConfigurationManager.GetConfiguration("dataConfiguration");
InstanceData instance =
databaseSettings.Instances["instance name"];
ConnectionStringData connectionString = databaseSettings.ConnectionStrings[instance.ConnectionString];
DatabaseTypeData type = databaseSettings.DatabaseTypes[instance.DatabaseTypeName];
string database=connectionString.Parameters["database"].Value;
similarly you can look for any property u wish to...
Hema S
|
|
|
|
|
The aim is to output double values by using .ToString() or one of its overloads.
<br />
double d = 0.0000001; <br />
Console.WriteLine(d.ToString()); <br />
How can I force the output format to be of a specific type? I'd like to output various double values in a format that always exposes a decimal point: 0.000001 instead of 1E-06
I've already tried .ToString("g") but that only works up to 0.0001.
Many thanks in advance.
Goebel
|
|
|
|
|
Look at the String.Format method!
like:
int numberofdecpoints= 10;
double actualvalue = 0.0000001;
String.Format("{0:F"+ numberofdecpoints.ToString() +"}",actualvalue);
Hope it helps!
All the best,
MArtin
|
|
|
|
|
It's a start, thanks!
Is there a way to store that double value in a string variable using that decimal point format?
Cheers,
Goebel
|
|
|
|