|
I'm diving into ASP.NET Ajax, but I'm having a hell of a time doing something more than just an Updatpanel and timer I've got a page with a textbox. I've connected an AutoCompleteExtender to the textbox and want it to automatically fire a method on my page to update a gridview. It's like a filter-as-you-type sort of box. To make it even more tricky, the textbox and it's extender are both being dynamically generated. Here's some code: code:
My ServiceMethod is something like this (just for testing): code:
I planned to have this method actually update the grid and just return an empty string array. Am I barking up the wrong tree here?
|
# ? Jul 12, 2007 21:30 |
|
|
# ? Jun 10, 2024 10:37 |
|
I am trying to make a program in VB.net 2003 that will email out some files. From my reading I am looking for the class system.web.mail but my install does not seem to have it. I am using .net framework 1.1 sp1. I am very new to VB.net and this is about the 3rd application I have created.
|
# ? Jul 12, 2007 21:46 |
|
MillDaKill posted:I am trying to make a program in VB.net 2003 that will email out some files. From my reading I am looking for the class system.web.mail but my install does not seem to have it. I am using .net framework 1.1 sp1. Are you sure you're using the .NET Framework 1.1? System.Web.Mail was changed to System.Net.Mail in .NET 2.0, and generates a compiler warning ("obsolete") in .NET 3.0.
|
# ? Jul 12, 2007 21:52 |
|
Richard Noggin posted:Are you sure you're using the .NET Framework 1.1? System.Web.Mail was changed to System.Net.Mail in .NET 2.0, and generates a compiler warning ("obsolete") in .NET 3.0. MillDaKill: Do you need to add System.Web as a reference to your project?
|
# ? Jul 12, 2007 21:57 |
|
Richard Noggin posted:Are you sure you're using the .NET Framework 1.1? System.Web.Mail was changed to System.Net.Mail in .NET 2.0, and generates a compiler warning ("obsolete") in .NET 3.0. pretty sure, here is a screen grab from the about page.
|
# ? Jul 12, 2007 21:58 |
|
SLOSifl posted:If he's using VS 2003, then he's using 1.1 for sure. How do I go about doing that? I can see system.web just not system.web.mail MillDaKill fucked around with this message at 22:04 on Jul 12, 2007 |
# ? Jul 12, 2007 22:00 |
|
SLOSifl posted:If he's using VS 2003, then he's using 1.1 for sure. Dammit, missed the '03 part.
|
# ? Jul 12, 2007 22:06 |
|
You probably just need to add a reference to the System.Web library. Try right clicking on the reference folder in your project and do add reference, or whatever equivalent there is for VB and VS.NET, since I have really only done stuff in C# and VS 2005
|
# ? Jul 12, 2007 22:10 |
|
Jethro posted:You probably just need to add a reference to the System.Web library. Try right clicking on the reference folder in your project and do add reference, or whatever equivalent there is for VB and VS.NET, since I have really only done stuff in C# and VS 2005 Success. Thanks to all.
|
# ? Jul 12, 2007 22:21 |
|
I am having a bit of a datagrid problem. I'm trying to hide a few rows in a DataGrid running CF 2.0. This hasn't worked any way I've tried it.code:
Edit: Fixed. code:
Shayla fucked around with this message at 15:38 on Jul 13, 2007 |
# ? Jul 13, 2007 14:45 |
|
I'm having a permissions problem with one of my .net applications. When the exe is run on a network drive, the runtime on that machine throws up security exceptions when trying to perform disk I/O or load external (unmanaged) dll's. From the error messages, I gather that the runtime is running my application under the LocalIntranet group. Looking through the .Net configuration tool I can see that this group is not allowed disk I/O access or unmanaged code. After reading about the .Net permissions maze, i understand why its there and how to set up new permissions policies. I am still unclear as to how I can either alter the LocalIntranet permissions or have my application run under a different set of policies. Could anyone help me with this? I am using the .Net 2.0 framework, the local machine(s) are XP SP2 and Vista, but the server may be windows2000.
|
# ? Jul 13, 2007 14:59 |
|
I may need to connect to a Progress DB (for Syteline) using a Merant driver. Right now, the majority of the desktops here don't have a DSN set up for it. I've googled for a bit, but am a bit lost as to how I would add it using Visual C#. Can someone point me in the right direction?
|
# ? Jul 13, 2007 19:57 |
|
pliable posted:Doesn't seem to work. It seems that Explorer wants to keep a permanent lock for some reason on the file, so it's constantly throwing exceptions. I lied. I was using File.Move() incorrectly . I thought the second parameter needed just a file path, not the whole path plus the full file name. Therefore, making it sleep for a few seconds and catching exceptions if it's still locked works. Thanks guys!
|
# ? Jul 13, 2007 23:33 |
|
Celebrity Toaster posted:I'm having a permissions problem with one of my .net applications. When the exe is run on a network drive, the runtime on that machine throws up security exceptions when trying to perform disk I/O or load external (unmanaged) dll's. From the error messages, I gather that the runtime is running my application under the LocalIntranet group. Looking through the .Net configuration tool I can see that this group is not allowed disk I/O access or unmanaged code. What you do is make a new set of permissions and make that set fully trusted. Instructions are halfway down this page.
|
# ? Jul 14, 2007 16:49 |
|
wwb posted:What you do is make a new set of permissions and make that set fully trusted. Instructions are halfway down this page. When I started to make .NET apps, I had problems with the permissions too. So I tried signing them and doing the permissions thing like you're supposed to do. But it's such a huge hassle that I just stopped doing that and now I'm just letting my programs be installed on either the user's PC or on the Citrix servers. In both cases I need some admin to install something, but at least they have experience with installing programs. They don't really with setting the .NET security policy. So if you can avoid it by not running it from network drives, do so. Otherwise you'll have to do the security thing in the link above.
|
# ? Jul 14, 2007 18:13 |
|
code:
e: spelling Also, for a better description, it's changing the mouse cursor to the copying cursor, but no new row shows up like I would expect. salithus fucked around with this message at 21:01 on Jul 16, 2007 |
# ? Jul 16, 2007 20:50 |
|
Are there problems when it comes to connecting to SQL Servers via named pipes? I ask because I have a conundrum at hand : I'd like to connect to my SQL server so I can manipulate data. I wrote a method in which I build a connection string with SqlConnectionStringBuilder(), and then return a string containing that connection string. The first time I try to connect to the server, I get this exception: quote:An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) I'm pretty sure the server is configured to accept remote connections, as I'm able to log in with my account just fine from my workstation. Not only that, I wrote a previous website that was able to interact and connect to the server just fine via named pipes. I tried setting up a temporary login to use (to test and see if that would work), so I added the necessary information to the connection string for that with no luck. So is it just an innate problem with named pipes? Or am I retarded and missing something obvious and vital (which is probably the case)? Last but not least, here is my code: code:
Thanks as always for the help!
|
# ? Jul 17, 2007 00:28 |
|
^^^So, are you using integrated security or are you using a SQL account? Pick one. PS: A few other more useful hints. First, is the delay until exception long (as in 20 or so seconds) or short? If it is long, that indicates there is a transport-layer issue, but short indicates a permissions issue and login denied. Anyhow, what you want to look at is the Sql Server Surface Area configuration tool, it is installed with sql client tools. You should be able to confirm that named pipes are working. Final question--why named pipes? wwb fucked around with this message at 17:27 on Jul 17, 2007 |
# ? Jul 17, 2007 12:56 |
|
salithus posted:
http://www.codeproject.com/csharp/DataGridView_Drag-n-Drop.asp
|
# ? Jul 17, 2007 16:16 |
|
Munkeymon posted:http://www.codeproject.com/csharp/DataGridView_Drag-n-Drop.asp Already read it, and it tells me (poorly) how to drop data into a ListBox. Currently, I'm using: code:
|
# ? Jul 17, 2007 16:24 |
|
uXs posted:When I started to make .NET apps, I had problems with the permissions too. So I tried signing them and doing the permissions thing like you're supposed to do. But it's such a huge hassle that I just stopped doing that and now I'm just letting my programs be installed on either the user's PC or on the Citrix servers. In both cases I need some admin to install something, but at least they have experience with installing programs. They don't really with setting the .NET security policy. Thanks for all the help guys I eventually got this sorted, although not without its troubles. It seems the .Net 2.0 configuration tool only ships with the SDK edition of the framework. Luckily my tool is only being used on maybe 10 computers, but i still didn't relish the thought of putting a 300mb install on each of them just to configure the security policies. I found this blog entry rather helpful in assisting me with what i needed to do. It won't be of much use to most of you, but maybe someone in a similar situation will find it as lifesaving as I did
|
# ? Jul 17, 2007 16:38 |
|
wwb posted:^^^So, are you using integrated security or are you using a SQL account? Pick one. I believe we're using integrated security I believe it was sort of long, but it's doing other things besides trying to connect to the SQL server (I think I mentioned it before somewhere in this thread, but before, it monitors a folder for .zip files, then when one appears, it takes that, moves it somewhere else, unzips it, then reads an XML, THEN I try to connect to the SQL server to upload the info). Thanks, I'll look at that. Named pipes because...that's what I'm given to work with . I don't think we want to use IP or anything else, so. Thanks again for your help, it's always appreciated wwb! Jethro posted:On the off chance you didn't figure this out, since I didn't see you explicitly say you changed it, if you are using integrated security, you do not need, and should not even have, a username and password. Yeah, I got it . Thanks for the heads up though. I've said it before, but SQL is pretty new to me, and I'm an intern here learning the ropes. Or more like, diving into the ropes head on and just figuring poo poo out on the way. pliable fucked around with this message at 22:17 on Jul 17, 2007 |
# ? Jul 17, 2007 20:37 |
|
pliable posted:I believe we're using integrated security
|
# ? Jul 17, 2007 21:00 |
|
Dromio posted:
code:
|
# ? Jul 18, 2007 11:01 |
|
thestoreroom posted:Well, it's probably too late for this, but what they don't tell you in the AutoComplete documentation is that if you're using a service method on your page rather than in a separate web service, it has to be static and conform to an exact signature.
|
# ? Jul 18, 2007 15:30 |
|
Hi there At work we had tonnes of files that needed to be scanned into a PDF format and placed in a network share. When a user scans a document it gets placed in there "Scan" folder on their C: drive in which they can rename it or whatever. To make life a little easier I made a small web application which allows a user to select the file they want, give it a name and from there the application adds all the relevant file extensions/conventions and puts it in the relevant folder. When the user has tonnes of files in C:\Scan they can press a button which deletes the files. I developed this in Visual Web Developer and when I run it through this software it works as I want it to work. However when I put it on our network and give it a virtual directory, how do I stop the delete command deleting the contents of the Scan folder on the server, when I want it to delete the contents of whatever workstation's folder the user is uploading with? Thanks in advance.
|
# ? Jul 19, 2007 16:56 |
|
Vedder posted:I developed this in Visual Web Developer and when I run it through this software it works as I want it to work. However when I put it on our network and give it a virtual directory, how do I stop the delete command deleting the contents of the Scan folder on the server, when I want it to delete the contents of whatever workstation's folder the user is uploading with? Someone correct me if I'm wrong, but I'm sure this isn't possible (unless you have an ActiveX control or something) as it would give way to a boatload of security issues.
|
# ? Jul 19, 2007 17:21 |
|
I'm having some issues casting an object (in an array) to int or Int32. Basically my code is: cmbCityTree.SelectedIndex = (int)arrTreeData[(int)STMCTI_FieldList.CityTree]; This does not work. I'm getting InvalidCastException. I've tried assigning it to a variable before SelectedIndex, but still no go.
|
# ? Jul 19, 2007 21:28 |
|
I need to know which one of these methods is more expensive/inefficient and why. I'm trying to detect if a string value is a number. This first method uses a regular expression, and will return true if the value can be converted to a whole number or int datatype: code:
code:
Thanks! -Bobby Crosby
|
# ? Jul 19, 2007 21:57 |
|
Ryuichi posted:I'm having some issues casting an object (in an array) to int or Int32. Basically my code is: Try using Convert.ToInt32() as in: code:
|
# ? Jul 19, 2007 22:44 |
|
Fiend posted:Which one is the least expensive and why? code:
code:
|
# ? Jul 19, 2007 23:43 |
|
Lone_Strider posted:Someone correct me if I'm wrong, but I'm sure this isn't possible (unless you have an ActiveX control or something) as it would give way to a boatload of security issues. Thanks for clearing that one up. As the application is only used by one or two people I can stick it on the machine's IIS.
|
# ? Jul 20, 2007 09:28 |
|
Fiend posted:I need to know which one of these methods is more expensive/inefficient and why. I'm trying to detect if a string value is a number. TryParse is probably the best of the bunch you have up there. I don't have reflector handy to check the implementation, but it is reputed to be very fast. See this blog post for some faster methods.
|
# ? Jul 20, 2007 13:28 |
|
I just got done writing a real-time line graph and spectrogram (linked because spectrograms are pretty), but now I need some sort of hierarchy chart or node graph. What I really want is one that will automatically plot a TreeNode structure. Ideally, it really wouldn't be too different than a TreeView, but there would be big rectangles or images for the user to click on and deal with. Such a thing exist? Commercial is ok.
|
# ? Jul 20, 2007 15:35 |
|
I've been considering the different ways of handling logging, but I'm not sure which is best. The Trace/Debug classes are great for simple messages in application assemblies, but when you need detailed logging output from lots of libraries and applications, they don't really work; you can't specify any additional information, you can't specify where the log message came from without explicitly saying so in the message itself, you can't have different levels of logging verbosity, etc. I've also been playing around with a set of classes and interfaces I've written that basically follow the observer pattern: any class that might want to log stuff implements an interface that specifies a log event. A listener can then be subscribed to that event manually or you can just take a load of objects implementing the logger interface and plug them into a listener. This is good because it allows you to selectively log messages from certain objects, but it also requires that you modify the class's public members simply to facilitate logging, which is far from ideal. How do you guys handle logging in your applications and libraries?
|
# ? Jul 20, 2007 16:24 |
|
Does anyone know how to call a function from a string of its name? I have <x> # of textboxes on my form, each of which needs to run code to update or insert a record into the database. Now I can't have the code running every time the text changes because that will be too often. I set up a timer that each textbox will start when the user starts typing, and it will be reset each time the text changed event starts. So when the timer tick event can only fire when the user finishes typing. What I want to do is have a data table with columns for textbox name, flag, function name. When the timer tick fires, I want to be able to execute the corresponding function for the textbox which has been editted (which is determined if the flag is set) I select from the datatable based on the name of the textbox, check the flag and then call the function. Or if you have a better idea I'd like to hear it. TextBox_TextChanged -> Timer_Tick -> private void function(no parameters)
|
# ? Jul 20, 2007 17:12 |
|
Nurbs posted:stuff I'm confused. Why don't you either use the Exit event, or better yet use an updatable DataGridView or something?
|
# ? Jul 20, 2007 17:15 |
|
Nurbs posted:
|
# ? Jul 20, 2007 17:17 |
|
salithus posted:I'm confused. Why don't you either use the Exit event, or better yet use an updatable DataGridView or something? I actually just thought of doing that. Not perfect for search boxes but it'd fit for the textboxes that serve for record editting. As for DataGridView, I use plenty of those but these aren't fields that I'd put in those. I'll look into delegates, but will probably stick with a exit event.
|
# ? Jul 20, 2007 17:20 |
|
|
# ? Jun 10, 2024 10:37 |
|
Inquisitus posted:logging...
|
# ? Jul 20, 2007 17:31 |