|
Well that's why Microsoft is cashing in with that. You need their full software suit to make something work. They should get sued for antitrust.
Donkaiser
|
|
|
|
|
my dear not full software just frame work requaired for it
Pradeep
|
|
|
|
|
I want to Create/Delet folders in server using C#.Net web developer 2005
and also getting list of files stored in the server
Thanks in Advance
|
|
|
|
|
Hi,
How can get the object from this string ?
string abc = "this.abc";
Thanks
Wilson
|
|
|
|
|
|
Would you mind give a example ?
|
|
|
|
|
I'm not able to understand your exact problem. But what I have understood from your msg is that you want the object to be made from string variable. If that is the case, I suppose boxing is the solution for you.
e.g.
object obj = (object)abc;
Pls excuse if I have misunderstood,
Krunal C
|
|
|
|
|
the problem is solved by others.
Thanks
|
|
|
|
|
I have a anchor where i set the href to a page,
in the page load method of the that redirect page i check the Page.Request.UrlReferrer .but it is null,but how can i set this href through java script so that the Page.Request.UrlReferrershould not be null.
so that i can perform something.
Bibhu Shankar Panigrahi,
Software Developer
|
|
|
|
|
Hi
I have a windows service which starts with windows and i have added a timer which restarts it after 3 minutes, to follow how it is working i have logged it completely by writing it in a certain file, it usually runs fine, but for once it stop logging and also stopped working, it appears on task manager and in services window it appears as running, last log entry in before starting the timer but after that timers tick event never called, can any one think of a reason why timer event lost.
Regards
Shajeel
|
|
|
|
|
I ran into this problem once, and never got to solve it. It has something to do with a timer being used in a windows service which is running on Windows Server 2003. What happens is that randomly, the timer events stop getting fired. I had to write my own timer then to get around this problem.
By the way, some people do report that they got the problem solved by using the System.Threading.Timer class instead of System.Timers.Timer. So if you are using System.Timers.Timer, try using System.Threading.Timer first.
|
|
|
|
|
it happened with the service only one time, and service is running for some time in many boxes. i was just wondering what went wrong there.
Regards
Shajeel
|
|
|
|
|
Hi i am trying to add some additional events to a control that inherits the listview however my problem is that the event doesnt seem to show up in the event browser.
<br />
public delegate void ItemClickEvent(object sender, ItemClickEventArgs e);<br />
<br />
public ItemClickEvent ItemClick;<br />
Here is the delegate and event i created what else is required in order for these to show up in the property grid.
|
|
|
|
|
Try
[Browsable(true)]
public ItemClickEvent ItemClick;
"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." - Rick Cook
www.troschuetz.de
|
|
|
|
|
You forgot the keyword "event". Try this:
public event ItemClickEvent ItemClick;
|
|
|
|
|
Hello,
Can you please tell me how can I hide the caret of a RichTextBox control completely while my app is running?
I tried this but it didn't work:
using System.Runtime.InteropServices;<br />
<br />
public class MyCaret<br />
{<br />
<br />
[DllImport("user32.dll")]<br />
public static extern int ShowCaret(IntPtr hwnd);<br />
<br />
[DllImport("user32.dll")]<br />
public static extern int HideCaret(IntPtr hwnd);<br />
<br />
}
This:
MyCaret.HideCaret(this.Handle);
And this:
MyCaret.HideCaret(richTextBox1.Handle);
But it didn't work. Please help. Thanks.
-- modified at 21:16 Wednesday 21st June, 2006
|
|
|
|
|
I'm programming a windows forms application that retrieves information from a database, binds it to various controls(datagrids, textboxes, datetimepickers,etc.). The binding happens correctly and saving and loading work just fine.
An issue, however, has arisen in the need to catch the form before it closes to ask the user if they want to save. Just catching the event and calling the save function if the user wants to save works, but I'm looking for a way to check the data before the dialog box pops, and suppressing the box from showing if there have been no changes.
I see this as being potentially doable from one of two places:
Within my handler class, which houses the database and the appropriate saving and loading functionality, as well as exposing the tables to the other classes.
Within the BindingSource elements(there are about a dozen).
The problem is, that I don't see any event or member in each one that I can handle or check to see if the data is different from the original.
I tried using a set of foreach loops that loops through every table in the dataset, every row in the table, and checking the RowState parameter, but they remain UnModified, because I don't call EndEdit() on the bindingsources (because I don't think I should do that until I'm actually saving).
Obviously, I could handle the Changed event on each control that I bindto, and set a boolean to true anytime after binding, but that seems very overkill and it seems like there should be an easier/better/more efficent way.
|
|
|
|
|
There are AcceptChanges() function and EndEdit() function.
DataSet changes are not commited until AcceptChanges is called, so I'm assuming you can call EndEdit and check the record state of your dataset for changes BEFORE saving the data.
You shouldn't call AcceptChanges until you saved the data as it updates the state of your rows (added and edited rows become unchanged, deleted rows are removed) but you can call EndEdit anytime.
"Democracy is two wolves and a sheep voting on what to have for dinner" - Ross
Edbert
Sydney, Australia
|
|
|
|
|
Thanks, you helped me find my issue. All of my various usercontrols inhereted a definition for a .Save() method that would call endedit, but in one of them I set flags to mark a "last modified date" field, that was giving me false positives if I was just trying to check. EndEdit() was the end solution though. Thanks.
|
|
|
|
|
I've got a TreeView and I've got nodes. Everything works fine, except the images I try to use for the nodes come out a little weird. I was expecting to have to play with the original image size, but no matter what I do the images appear a little weird (some parts fuzzy, some parts thick, some parts a little off from original color).
The original images are bitmaps, and I'm just loading them into an imagelist for the TreeView to use.
What's wrong with this picture? Why do other people's treenode images look crisp, clear, and cool, and mine look like they got smudged a little? What am I missing?
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
I noticed that with several controls in VS 2005 (status bar for one). I've never seen it happen in 2003. I'd like to know too if somebody has an answer.
Try code model generation tools at BoneSoft.com.
|
|
|
|
|
This is a continuation of my previous post which Josh was helping me with.
I have the following code:
private void BindData()<br />
{<br />
strPartNumberInputReference = txtSearchPart.Text;<br />
ds = new DataSet();<br />
ds=SqlHelper.ExecuteDataset(this.connectionString, "dbo.GetPartInfo", param);<br />
Session["ds"]=ds;<br />
dt = ds.Tables[0];<br />
Session["dt"]=dt;<br />
dgParts.DataSource=dt;<br />
dgParts.DataBind();<br />
txtSearchPart.Text = "";<br />
<br />
}
I am using the Microsoft SQLHelp.cs class. When it tries to fill the dataset I get the error "Object must implement IConvertible." The code is getting stuck in:
public static DataSet ExecuteDataset(SqlConnection connection, CommandType commandType, string commandText, params SqlParameter[] commandParameters)<br />
{<br />
SqlCommand cmd = new SqlCommand();<br />
PrepareCommand(cmd, connection, (SqlTransaction)null, commandType, commandText, commandParameters);<br />
SqlDataAdapter da = new SqlDataAdapter(cmd);<br />
DataSet ds = new DataSet();<br />
da.Fill(ds); <br />
cmd.Parameters.Clear();<br />
<br />
return ds
I have tried the debugger (which I have little experience) and found that was the line it doesn't like. I've been trying to find some online resources but have not come any further in trying to figure out why I'm getting this error.
|
|
|
|
|
see if this[^] works. He is saying to use the overloaded ExecuteDataset() that specifies a command type.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Any takers? I need to do an automated form based post where I will post to another .aspx page over a secure https url. In the form post will be 9 fields of data that are text and one which is a binary file.
A NameValueCollection works like a charm for just the text input fields, but I can not seem to include the file which needs to be a binary format. The NameValueCollection expects a string value for the key pairs. I have examined what .Net provides as far as UploadData, UploadFile and UploadValues. I am using UploadValues because of the NameValueCollection.
Any suggestions on how to post everything at one time? Thanks in advance.
My code is:
int FileLen = this.Filepath.PostedFile.ContentLength;
byte[] FileBinaryData = new byte[FileLen];
HttpPostedFile theFile = this.Filepath.PostedFile;
theFile.InputStream.Read(FileBinaryData, 0,FileLen);
NameValueCollection theCollection = new NameValueCollection();
theCollection.Add("ID", "someid"); -- these values will all be suppiled.
theCollection.Add("PWORD","somepwd");
theCollection.Add("PID", "sometextvalue");
theCollection.Add("FOLDER", "sometextvalue");
theCollection.Add("FILE001", theFile); --this needs to be the binary value
theCollection.Add("TYPE1","sometextvalue");
theCollection.Add("FILE002", "");
theCollection.Add("TYPE2","");
theCollection.Add("INVOICE_NUM", "");
theCollection.Add("TOTAL_FEE","");
string url = ConfigurationSettings.AppSettings["PostingURL"].ToString();
WebClient theRequest = new WebClient();
System.Net.NetworkCredential thecred = new NetworkCredential(ConfigurationSettings.AppSettings["NTLogin"].ToString(), ConfigurationSettings.AppSettings["NTPassword"].ToString(), ConfigurationSettings.AppSettings["Domain"].ToString());
theRequest.Credentials = thecred;
byte[] responseArray = theRequest.UploadValues(url,"POST",theCollection);
string m_ResultText = Encoding.ASCII.GetString(responseArray);
return m_ResultText;
GG
-- modified at 12:02 Wednesday 16th August, 2006
GG
|
|
|
|
|
anybody can write the equivalent code for the following without generic:
public class SampleClass<T, U, V> where T : V { }
thank you in advance.
IT makes life crazy!
|
|
|
|