
bri189a
Avatar/Signature-
Posts
1014 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by bri189a
-
If the values weren't many you could also just check it on key press and if it wasn't an allowed key then you would cancel the key press. Sometimes regex can be overkill if it's something simple; especially if you don't know regex.
-
Correct syntax for returning a dataset
bri189a replied to tbcmartinharvey's topic in Database / XML / Reporting
Dim ds as New DataSet Dim da as New DataAdapter da.SelectCommand = cmd da.Fill(ds) Notice that the data adapter opens and closes the connection. Remember to clean up your objects too. -
Let me see if I understand the question...this is what you want: 1. User submits form. 2. Code behind (VB/C#) writes a javascript confirm message (to current page). 3. User clicks Cancel. 4. Code behind stops executing. If that's what you're trying to do, if I understand you correctly; it's not possible unless you do a multipage type of thing: 1. User submits form. 2. Code behind (VB/C#) writes a javascript confirm message (to current page). 3a. User clicks OK. 4a. Form submits itself and code behind redirects to page (could be same page with query string) that handles 'OK' path. or 3b. User clicks Cancel. 4b. Form submits itself and code behind redirects to page (could be same page with query string) that handles 'Cancel' path. ASP and Client browser are a 1 way street - you're either going to the server or coming from the server - you can't stop half way and ask the client to process something and then continue on your original trip to the server. Follow me? Or did I totally miss you're question?
-
You could set up a watch or do a Quick Watch. Also, result won't be set until Line 9 - at Line 8 you're setting value.
-
Grant read permission on folder to user
bri189a replied to peterdoherty's topic in Directory / File IO / Registry
That's a hard one, I can't remember the name of the API, but that's the route you're going to have to go. A search on MSDN for folder permissions should get you in the ball park. Know that's not much help but hopefully it will get you towards your goal. -
I can't quite follow what you're doing, but if the javascript method returns false, then the form shouldn't post back. In otherwords: <input type="button" value="Click Me" onclick="return false;"> will never cause the form to post. Sometimes you have to me more squirelly about it: <input type="button" value="Click Me" onclick="return (if(MyJavaScriptMethod() && MyOtherMethod()){return true;} else {return false;})" Just make sure whatever attribute is originally calling the method returns false and all should work.
-
WHERE First_Name LIKE '%?%' AND Last_Name LIKE '%?%' should work... Some db's wild card is * instead of %.
-
I'm working on a custom server control and have a component I created that is a property of this control. If I manually (in code) set the property, everything is great - if I let the desinger do it, in the html it properly assigns a value, but when the page renders I get the following error: Unable to generate code for a value of type 'MyComponentName'. This error occurred while trying to generate the property value for ThePropertyMentioned - this happens before the constructor for that component is even called...so I don't know what .NET is trying to do. No other custom properties of the control have this problem; but they're simple native types. I googled the main bits of the error and got jack. And I can't figure out what the problem is, and while the control works great if I set the property manually; it's annoying - it would be like manually having to set the DataSource of a drop down list rather than letting the designer do it. Any ideas?
-
Have a function that gets all records before performing your excel writing code.
-
That is simple; guess I was reading too much into the other parameters. Thanks!
-
Yeah...the sn.exe. command line utility...um...that syntax is so long and the 'help' is so obscure that it's not much good to me...I'm searching code project for a good example or anywhere else I can find and haven't found a good tutorial/example yet...do you have any PD or know of some? Trying to avoid that utility is what got me to posting a look for the 'Signing' pane.
-
Okay, I figured out how to 'publish' or change the build - but signing the assembly...well now how do I create a key to do that? The instuctions in 'help' saying there's a 'Signing' pane...yeah...where'd they hide that cause I opened every window (I think) and couldn't see that one.
-
In Version 2.0 you don't seem to have these any more? What's up with that? In another post I complained about having to strongly name something to use it (because XCOPY isn't good enough for WebPartManager); now I can't strongly name it because I can't find a dll or assembly for it? ***????
-
So nice of them to design ConfigurationManager.ConnectionSettings("MyConnection").ConnectionString Has anybody figured out how to use this when using a ...DataSource object In otherwords on a SQLDataSource object, the connection string can look at the web.config file (rather having to create a new one). Or for AccessDataSource object, the DataFile could look at the connection string rather than having to add the database to your App_Data or manually typing in the path. To me this would be great usability.
-
The thing that is getting me, because I tried again and I added those config settings as MSDN points out, but the manager doesn't seem to look at them. <membership defaultProvider="AccessMembershipProvider" userIsOnlineTimeWindow="15"> <providers> <add name="AccessMembershipProvider" type="WebPartsDemo.AccessMembershipProvider" connectionStringName="AccessMembershipConnection" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="true" writeExceptionsToEventLog="true" /> </providers> </membership> If the object doesn't look at this setting, what is the point of it being there?
-
Keep forgetting what IIRC means...anyway, I saw that somewhere but I could never get past that error. Also, this has been driving me nuts...SQL Express...can't open in Enterprise Manager; when trying to register I get 'You must use SQL Server management tools to connect to this server'...but the tools that come with SQL Express when you install CR1 doesn't contain any tools that allow you to view databases, set users, etc...just network protocol stuff. Anyway, with web parts...does it just build all the necessary tables, views, stored procedures, etc? Or is it already built as a template in SQL Express? I ask, becasue when I got to push this at work, I'm going to need to know what special requirements are needed for configuration management (as I'm in charge of that). Thanks PD for your help, as always you are the master of answers.
-
My shared host has set up a server for us to do VS2005 demos on. They did not install SQL Server Express or it's not reachable by my application...can't get a straight answer from them. When doing web parts, the web part manager, or whatever it is, that controls the persistence of user settings is built by default to connect to SQL Server (how I'm not sure...connection string somewhere?), so anyway I made a custom personalization class for it to talk to. Problem now is that the darn manager wants it to be registered - which can't be done because it's a shared host and an individual web site isn't going to be allowed to register their custom objects. Does anyone have a clue how to get web parts working on a shared web host where you're only database option is Access? Also, on a side note, why is Microsoft going to more and more of this 'registered' stuff...I thought the hole XCOPY part of .NET (outside of core framework) made life great...now we're getting back into all this registering stuff...what's the deal with that? This is two great features now that I can't use because of things that don't 'have' to be registered technically, but MS is making it so that it has to be (Enterprise Library, and any custom Personalization object for WebParts...I'm sure there's more).
-
Only thing I can think of is your dynamically changing the text mode and you're doing the change after the text box has fired it's events in which case the change won't take place right away.
-
You're mixing languages - it's highly NOT recommended to mix asp.net with asp. If you were to do this, you need to strongly name your dll and install it on the remote server then create an instance of the object in your asp page: Server.CreateObject("YOURDLLNAME") - and that's if I recall the hack I saw out there somewhere correctly....and that's exactly what it is, a hack. Please, do yourself, and anyone who has to maintain this a favor; don't mix classic asp with .NET!
-
If you could be a lot less vague we may be able to help - what you have posted just opens a plethera of follow up questions.
-
ExecuteDataSet isn't a native .NET method (at least in v1.1 - don't know about beta 2.0 - but then I would think you'd mention if you were using that) so I assume: what extension have you added that does this (Enterprise Library, 3rd party, etc.) ExecuteDataSet method? It may be the way they wrote that method. It may be the type of object too - definitely haven't seen any object out there that has a Autoincrement property, including Enterprise Library.
-
OnSelectedIndexChanged stopping form from displaying
bri189a replied to ianmcinnes's topic in ASP.NET
If the sub you wrote called PopulateTown isn't protected (private), then you will recieve an error. Notice in your second example you don't have the OnSelectedIndexChanged event in the attributes...thus no error. Rather than having OnSelectedIndexChanged in the html code you could just wire up the event in the code behind. The only time that I wire up events in the html is if the control is in a container that wouldn't fire child events normally (such as a datagrid). -
I don't do this often enough to remember and solution that worked before doesn't work in this instance. I'm making a control that derives from Component (it's something that will NOT be rendered) instead of WebControl (so it doesn't show up on designer - only components section). Anyway, one of it's property's uses the CollectionEditor for the EditorAttribute. Problem is that anytime I 'build' the project anything that is in that collection is lost. In a previous project since it was a rendered control I just used DesignerSerializationVisibility and PersistanceMode attributes to get it to save in the code of the server tags - well since this is a 'component' there are no server tags. I've tried every combination of PersistChildren/ParseChildren trying to 'luck' into the right combination - so now I reached the point of having to admit I don't know and hoping for some help. I know somehow VS will put the code into the code behind but I can't figure out how for the life of me. Thanks.
-
On the subject...ever been in a shop that crossed from VB to C#?; let me tell you it isn't pretty going back and changing a bunch of VB6 legacy code to .NET code - you learn real quick why you should use the .NET method regardless of whether it's VB or not.
-
Correct path for connection in wizard
bri189a replied to matt09524's topic in Database / XML / Reporting
I have yet to see the wizard take application variables as part of the connection...generally it's not a big deal thought since I rarely use the wizard; but if you ever find a way, let us know!