|
Thanks for your reply. I require
File path from the Upload control textbox
|
|
|
|
|
I am not sure, as I am not in front of a machine where I can check that. But, I'm guessing it's either YourUploadControlTextBox.Text, YourUploadControlTextBox.FilePath, or YourUploadControlTextBox.Path. Try those, one should work You could always look on MSDN and look up the control. They wil have a list of all members, properties, etc to do with the control. The FilePath property, or something like it should be on there.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
No, the thing is that how I will get the IDs of the controls in Submit button click, I am loosing the IDs as the controls are dynamic, not using AJAX.
|
|
|
|
|
I don't know about WebForms but in WinForms you have a Controls property so you could loop through it like:
foreach (FileUploadControl item in this.Controls)
{
this.Text = item.ID;
}
I think there's something similar in WebForms. It'd be easier to give you a working example if you explained a bit more thoroughly what you're trying to accomplish (with a bit of context perhaps).
|
|
|
|
|
marry christmas and happy new year for everybody,
i need to display the rows in my database into a list box in the form, when i use a textbox or combobox it display only the last feild. but when i'm using the list box nothing displayed.
N.B. how to display all the feild and how to control each feild alone?
here the problem:
while (mReader.Read())
{
MessageBox.Show( mReader["Trusted"].ToString()
}
thank you and best regards
|
|
|
|
|
ListBox box = new ListBox();
List<string> items = new List<items>();
while(mReader.Read()) {
items.Add(mReader.GetString(mReader.GetOrdinal("Trusted"));
}
box.DataSource = items;</items></string>
That should do the trick
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
Hi,
A quick question on using events in c#. I have a groupbox on a winform. In that groupbox are a number of textboxes, buttons etc. In order to keep the screen clean, when the mouse is not in the groupbox, some of the buttons are hidden. I use the mouseEnter and mouseLeave events to trigger this. The problem I have is that when a button appears and I click on it, it doesn't trigger the Click event.
If I disable the hiding/making visible events then it all works fine.
Any ideas?
Many thanks,
John.
|
|
|
|
|
Can you show the code that is hiding/showing the buttons?
There should be also some code to hook up the click events, if you reattach the click event after showing the button it all should work fine
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
Hi Willem,
In the designer script, I have the following events defined for the groupbox:
this.Conduit_Info_Group.MouseLeave += new System.EventHandler(this.Conduit_Info_Group_Exit);
this.Conduit_Info_Group.MouseEnter += new System.EventHandler(this.Conduit_Info_Group_Enter);
For the specific button, here is the defined event:
this.Conduit_AuthorisedAmount_Graph.Click += new System.EventHandler this.Conduit_AuthorisedAmount_Graph_Click);
Here are the above 3 methods:
private void Conduit_Info_Group_Enter(object sender, EventArgs e)
{
this.Conduit_AuthorisedAmount_Graph.Visible = true;
}
private void Conduit_Info_Group_Exit(object sender, EventArgs e)
{
this.Conduit_AuthorisedAmount_Graph.Visible = false;
}
private void Conduit_AuthorisedAmount_Graph_Click(object sender, EventArgs e)
{
<do stuff="">
}
I have also tried changing the enter and exit events as follows:
private void Conduit_Info_Group_Enter(object sender, EventArgs e)
{
this.Conduit_AuthorisedAmount_Graph.Visible = true;
this.Conduit_AuthorisedAmount_Graph.Click += new System.EventHandler(this.Conduit_AuthorisedAmount_Graph_Click);
}
private void Conduit_Info_Group_Exit(object sender, EventArgs e)
{
this.Conduit_AuthorisedAmount_Graph.Visible = false;
this.Conduit_AuthorisedAmount_Graph.Click -= new System.EventHandler(this.Conduit_AuthorisedAmount_Graph_Click);
}
In other words, I've reattached the event after showing the button and removed the event after hiding it, but it doesn't make a difference.
Another thing I've tried is removing the event MouseEnter once I've entered the groupbox and reattaching it after I leave. My thinking was that MouseEnter events were swamping the message queue and my button press event was getting lost, but still it wouldn't work!
Some days, VB6 just seems much simpler
Many thanks,
John.
|
|
|
|
|
I wouldn't bother with detaching/reattaching; just attach it as usual and leave it.
|
|
|
|
|
hi i m new and wants to know the best book for c#
help as a alias.
Be happy and make others happy.Cheer up...........
|
|
|
|
|
help as a alias wrote: hi i m new and wants to know the best book for c#
If your just starting out then I'd recommend Visual C# 2005 Step-by-step (Microsoft Press)
|
|
|
|
|
The specification can be downloaded from Microsoft.
|
|
|
|
|
I would suggest Sams Teach Yourself: Visual Studio .NET 2003 in 21 days. (I am sure their are newer versions than 2003, but that is what I use). This book is the first book I turn to when I have a coding problem.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
This is a project where we use webservice and windows service. windows service will send screenshot and information about the process and services of the client to server every ten second.
now i need to create a simulator which can generate more than 400(i.e 400 different computers requesting the server at the same instance of time) request at the same instance of time. HOW CAN IT BE ACHIEVED? what are the complication? how will the iis server handle it, and the ms-sql server handle it .....will there be network congestion...
somebody please share the idea.....
thanks in advance
modified on Monday, December 31, 2007 6:27:28 AM
|
|
|
|
|
There are free loadrunners on the internet that can help you generate the load you need.
However I can't tell what the server will do, this depends totally on how effecient the application is and how wel equipped the server is in terms of hardware.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
Thanks for the reply... hope that i will find some free loadrunners if you could find some good ones please recommend me..
|
|
|
|
|
|
A technique I've been playing with is to deploy the application as a "ClickOnce" app to a server share, but not make it available offline (so no start menu item is created on the users machine). Then I just send out a link to the .application file (file://server/share1/Support/Apps/MyWonderful.application). This works pretty well, and lets you specify what permissions you want your application to have.
"On one of my cards it said I had to find temperatures lower than -8. The numbers I uncovered were -6 and -7 so I thought I had won, and so did the woman in the shop. But when she scanned the card the machine said I hadn't.
"I phoned Camelot and they fobbed me off with some story that -6 is higher - not lower - than -8 but I'm not having it."
-Tina Farrell, a 23 year old thicky from Levenshulme, Manchester.
|
|
|
|
|
I want to make the background of boolbutton images to be the same with system color.
How can I do? By the way, what does mean "ImageTransparentColor" property in VC#?
thanks.
|
|
|
|
|
ImageTransparentColor is the color within the image that will NOT be drawn. So, for example, to make a bitmap where the only thing visible is a single black dot, make one with a single black dot over a magenta background. Then set the ImageTransparentColor property to magenta, and it will not be drawn. This is used so the images don't have to fill in a rectangular area when drawn. I beleive this answers both questions. (to make it system color, simply set the ITC property as described above, then set the container's backcolor property to the system color). Hope this helps,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Hi
How to restrict file type in one or more dynamic file upload controls in C# Web project.
For example I am creating code in code-behind
FileUpload uploadDataFile = new FileUpload();
In Browse dialog I want to restrict File Type as Xls, txt, CSv.
Please remember FileUpload controls are creating dynamically.
Thanks in Advance
|
|
|
|
|
Elena2006 wrote: In Browse dialog I want to restrict File Type as Xls, txt, CSv.
It's not possible with FileUpload control. You can check the file extension and content type after submitting the form.
|
|
|
|
|
What would be the point? A particular extension doesn't guarantee what the contents are.
|
|
|
|
|
I have a tricky problem that I could really use some help on.
My app works with a number of very large float[] arrays that can easily use more memory than is available. To solve this I have created a memory manager that, in cases of dwindling memory, will dump some of the older arrays to temporary files. My app can request a reference to one of these arrays at any time, and the memory manager will recreate the array from the dumped copy if it's no longer in memory.
The problem is that my memory manager must not dump to disk any arrays that are currently being used by other parts of the app because a) any further changes to the array won't be reflected in the dumped copy, and b) dumping an array to disk that is being kept in memory by other parts of the application won't help memory load to begin with since the array won't be collected.
How can my memory manager, when it is deciding which arrays to dump to disk, check to see if other parts of the application are holding references to any of the arrays?
Thank you very much!
|
|
|
|