khaled94's Q&A profile
.NET Development How i allow my zip file to be downloaded
hi group, i want my zip file to be downloaded only when a user is logged in. when the user is not logged it will redirect to the registration form or login page. my registration and loging module are in same form. if he logs in then it will redirect to the download page and allow to download i want to put my zip file path secure so any one cant access directly that path Hi! Thanks for asking! I'm a member of the ASP.NET team, and was just popping over here to see what was going on. The best place to ask ASP.NET questions is over on the ASP.NET forums at http ...Show All
Visual C++ Mixed c++ TypeLoadException Internal limitation: too many fields.":"<Module>
When I load my mixed c++ dll using Assembly.LoadFile from a C# application I get a TypeLoadException with message "Internal limitation: too many fields.:"<Module>"" How can I possibly know which type it is and what could be the problem OK, finally I understand what causes my problem. There seems to be a limit in the assembly loader. With more than 65535 global FieldRVA entries in an assembly the loader raises the TypeLoadException exception. This seems to be no limit of the assembly format but of the loader code. I loaded the assembly with ildasm - what is really slow and did a dump "all" of the assembly. Searchin ...Show All
.NET Development DeSerialization error with strongnamed assemblies
Using C#, VS 2005 , .Net 2.0 I persist class objects to serialized bin files which is convenient and simple. However, when started compiling with strongnames (ie. using .snk file) I hit a snag. When I change the version number of the assembly and try to deserialize a file that was serialized previously, I get a load error message ("the located assembly manifest definition does not match the assembly reference.") For a simple example, MyApp (version 1.0.0.0) serializes myClass to myClass.bin Then I recompile MyApp with new version number 2.0.0.0 and rerun MyApp. then following produces the error MyApp (version 2.0 ...Show All
Visual Studio Express Editions Can you help??
Hi I am working on a program and i want to take the data from a roe in the database and use it in my form.But I havent got a clue how do do this. can you help thanks hi, you have many options you can use your bindingsource.filter ="yourcolumnname = '" + thevalueyousearchfor + "'" you can use dataview dv as new dataview("yourtable","yoursearchcritare","",) search msdn for dataview and datarowview you can use a manualconnection to do that http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=214089&SiteID=1 and there are other options depending on what you ...Show All
Windows Forms UserControl GotFocus and LostFocus events
I'm working on making a UserControl with a label and a vScrollBar because the numericUpDown control has no way to hide the scroll buttons when the control loses focus. Problem I'm having is with the focusing of the control once its in the form. As it is now I have to to wire up an event when the user clicks in the label in the control to let the form know it has focus, then in the form, for the eventhandler, I have to manually set the focus to the control. Seems once I lose focus to another control I can't regain the focus by clicking on it. Is this a bug or what I would think that the basic events (especially focusing) would already be hand ...Show All
Visual C# Are strings any easier in the new C#?
I stopped using C# about a year ago. I hated the complexity of using strings. Gone were the days of MyString = "Hello"; I had to now make an object. String manipulation, which was once easy using MID, RTRIM, REPLACE, etc., now is tedious. Anyway, I was wondering if the newest version of C# has made it any easier Um, you couldnt do - string s = "Hello"; what was so hard about - string s1 = s.Trim() string s1 = s.Substring(1,2); Its no different than in VB.Net. Unless you use the non CLR compilant VisualBasic assemblies; no different except that, in vb, dec ...Show All
.NET Development X has encountered an error and needs to close...
In .NET 2.0 it sometimes happens that users of my application receive an error just like in Microsoft programs: X has encountered an error and needs to close. We are sorry for the inconvenience. Would you like to send an report to Microsoft (! ) I don't understand... what kind of exception are that This thing didn't get caught in my general try catch handler... It seems to me that this is a joke :( Thank you for any help! David Sounds like Error Reporting is turned on in Windows. In this case you'll get this if an unhandled exception occurs in your app. How did you define your general t ...Show All
.NET Development A question on the new CLR Profiler for .NET Framework 2.0 Beta2
I notice that there is a new release of CLR Profiler for .NET Framework 2.0 Beta2. However, there is also a profiler in Whidbey Team System Beta2. What's the difference between them Which one should I use Thanks! To a certain extent this is what has happened - the VSTS folks have looked at CLRProfiler and integrated the most important features into VSTS. The idea was that most users would just work with VSTS. Thanks Peter ...Show All
Visual C# Copy a float to an array in network order?
Hello, I like to send an udp packet with several measurement values to another network station. Some values are float values (4 byte). How can I copy the float values with C# to the byte array of send data How can I get the right byte order, big endian Thanks and regards, Jens hi, you can use BitConverter class to convert the types like for example double test = 3.123; byte[] doubletoByte = BitConverter.ToByte(test); to convert it back double test2 = BitConverter.ToDouble(doubletoByte,0); to change it to Bigendean or the network binary system you use the ipAddress double bigend ...Show All
Windows Forms Count Panels in StatusBar?
How can I count number of panels in a StatusBar control StatusBar1.Panels.Count did work. Could not find anything in IntelliSense though. Any reason why it has been decorated with EditorBrowsable(EditorBrowsableState.Never)] Thanks ...Show All
Visual C++ "ocscpy" depricated. What replaced it?
Trying to compile a .cpp file with this statement (the file was downloaded from an MSDN website for C++ Samples) ocscpy((*p_si1)->m_rgSymbol, p_si2->m_rgSymbol); I got an error message: Warning 2 warning C4996: 'ocscpy' was declared deprecated I could not find ocscpy anywhere in MSDN. Any clues as to where to get a replacement Thanks I am not sure if that is the final version but it might be an RC one. I believe if you have an msdn subscription you can download the RTM version. http://msdn.microsoft.com/subscriptions/ should have more details! Thanks, Ayman Shoukry VC++ Team ...Show All
Visual FoxPro How to read in sequence a lot of combo box?
can I read in sequence (with a FOR cicle, or something similar) the list index, of a lot of combo box and, can I associate a combo box with a txt box For example...I have 3 combo and 3 txt....if i selected something on combo 1 read the txt, otherwise no...and the same for the other txt Can I do that in automatic with a for cicle If you don't understand, what I asked you, please tell me! Yes you can read in sequence. ie: local ix activate screen with thisform.myListBox for ix=1 to .ListCount .List(m.ix,1), .IndexToItemID(m.ix), .Selected(m.ix) endfor endwith You can ...Show All
SQL Server SQL server 2005 management studio
I just installed VS 2005 along with sql server 2005 cpt. No errors & VS works fine, but I cannot find the management studio. I have used Add/Remove to check for the possibility that I could add management studio -- no luck. Did a file search for sqlwb.exe -- again no luck. When viewing list of installed programs with Add/Remove I do not see an entry for sql 2005 tools. Should there be Any help would be much appreciated -- TIA. I'm having similar problems with finding the 'sqlwb.exe' file. I have removed VS and SQL Server 2005 already, but I was wondering how you cleaned up the registry ...Show All
.NET Development GC.Collect() freezes for several seconds on gen 2 collection
I have a server application which manages a few hundred thousand objects in a Hashtable. Each object has to be in memory for fast lookup and access. The keys are not changed so the Hashtable itself is fairly static, but the objects are constantly updated via incoming data and read to serve user requests. The problem is that every 5 minutes or so the GC kicks in and freezes the entire process for up to 4 seconds. This is regardless of whether other threads are running, e.g. even if I do no updates or queries, it takes this long just to create all object graphs for collection, even when nothing is collected (i.e. GC.GetTotalMemory returns ...Show All
Visual C++ Native allocation in a managed C++ class library
Hello, I just want to allocate a native object using the IJW in a managed class library. I usually do this normally in a Windows Forms application. But when I make managed C++ class library and try to allocate with new keyword it doesn't recognize this keyword . I don't why . Thanks, Mustafa ELBanna Hello, Thanks, But I must know the reason of why it works now Thanks, Mustafa ELBanna ...Show All
