1. Question

    Date: 03/22/05     Keywords: asp

    Hey everyone. My name is Lisa and I'm new to this community.

    I have a question that doesn't pertain to ASP.NET, but rather to VB.NET and I'm hoping you can answer it. (I can't find a community for VB.NET, yours was the closest)

    I'm using VB.NET in my UI class, and I'm wanting to format some output that was brought in from a text file. A friend of mine who has extensive knowledge of VB6, but not .NET, recommended using MSFlexGrid for a gridded tabular layout.

    I looked it up in the MSDN and found it listed under the VB6 reference, but it's not mentioned in the VB.NET reference. I was wondering if any of you smart people out there would know if MSFlexGrid is compatible with .NET or if there is a .NET system I can use that would achieve the same effect.

    Many thanks!
    --Lisa

    Source: http://www.livejournal.com/community/aspdotnet/29253.html

  2. Obscure comma problem

    Date: 03/14/05     Keywords: asp, java, web

    Here is my obscure problem. I've got a page where a some checkboxes get added dynamically by javascript like so.

    [input type="checkbox" name="extra" value="uno" /] Uno
    [input type="checkbox" name="extra" value="dos" /] Dos
    [input type="checkbox" name="extra" value="tres" /] Tres
    I can then retrive them in my aspx.cs code like so:
    string extras = HttpContext.Current.Request.Form["extras"].Split(",");
    // extras[0] == "uno"
    // extras[1] == "dos"
    // extras[2] == "tres"
    This works as expected and desired unless the javascript winds up adding checkboxes like:
    [input type="checkbox" name="extra" value="first item" /]First Item
    [input type="checkbox" name="extra" value="Second item, with a comma" /]Second item, with a comma
    [input type="checkbox" name="extra" value="third item" /]third item
    In which case we get:
    string extras = HttpContext.Current.Request.Form["extras"].Split(",");
    // extras[0] == "first item"
    // extras[1] == "second item"
    // extras[2] == "with a comma"
    // extras[3] == "third item"
    Which is not what is desired. So my question is if there is a way to properly retrieve these values using ASP.NET or do I need to rewrite the javascript code so the name attributes are different and an another hidden control tells me what the names to look for are?
    Solution is here:

    public static ICollection FormVars(System.Web.HttpRequest request, string varName) {
    	StreamReader sr = new StreamReader(request.InputStream);
    	string post = sr.ReadToEnd();
    	sr.Close();
    	ArrayList values = new ArrayList();
    
    	string[] labelValues = post.Split('&');
    	foreach(string lv in labelValues) {
    		if (lv.StartsWith(varName)) {
    			string val = lv.Substring(varName.Length + 1); // varName=
    			values.Add(System.Web.HttpUtility.UrlDecode(val));
    		}
    	}
    	return values;
    }
    
    
    
    ICollection extras = Utils.FormVars(HttpContext.Current.Request, "extra");

    Source: http://www.livejournal.com/community/aspdotnet/28923.html

  3. pdf to database?

    Date: 03/11/05     Keywords: sql

    Does anyone how to store a .pdf file into a sql table as a binary?
    THANKS

    Source: http://www.livejournal.com/community/aspdotnet/28550.html

  4. Asp.net controls, rendered with a variable

    Date: 03/09/05     Keywords: html, web

    This is probably something really stupid and simple I am doing wrong, but it has me stumped.


    in my code behind (c#) I have a variable:

    protected string dateRegex = "blah"; //lengthy regex with this weeks corp standard date expression (actually it is read from the web.config, but I have tried it as static for this example as well)

    now, we have a custom control, that was already in place when I got my hands on, that I don't have access to modify freely at this time... it is a TextBox with a regex validator attached to it. It has a default regex expression, that I want to override... so I am trying it like this:




    my problem is that this renders to html as a literal string, not as a server side variable:
    in the span for the validator control, I see:

    validationexpression="<%= dateRegex %>"
    if I use the databinding syntax instead of the rendering (<%# dateRegex %>) it evals it as null, and uses the default expression I am attempting to override. it works correctly (overrides) if I paste the new expression into the variable on the control, but this defeats the purpose of having the expression in my web.config file so that it could be changed in just a single place (there are between 20 and 60 Date Text Boxes on this screen, depending on the user's permission level).


    Ideas? (other than repairing the object itself so that it handles changes to the expression property correctly)?

    Source: http://www.livejournal.com/community/aspdotnet/28399.html

  5. determine event raised in page_load?

    Date: 02/10/05     Keywords: no keywords

    Ok, I've got a page that has several different controls and events on it, such as a button click, sort, hyperlink, etc. What I need to do is determine which event was raised, in other words I need to know which event posts back the page so I can code accordingly in the page_load event.

    Is there some kind of

    if event_raised = true

    that I can use?

    Source: http://www.livejournal.com/community/aspdotnet/28139.html

  6. anyone awake?

    Date: 02/10/05     Keywords: database, asp, sql

    Hello, Heres what I need to do:

    Bind a CheckBoxList Control to a database where it will select 13 things out I want the easiest way to check which checkboxes are checked and which aren't and add to my database of features the boolean options 1/0 if they are checked or not. Any help would be appericiated.

    I'm using ASP.net, SQL7


    I have a ghetto version thrown together thats somewhat working if you want to pm me on aim 'sontek' and talk about it. I can paypal a little bit of money for any help. (i'm not rich, so LITTLE, like $20 :P)

    Source: http://www.livejournal.com/community/aspdotnet/27717.html

  7. .Net question for you

    Date: 02/10/05     Keywords: microsoft

    Hi,

    I'm not a developer, so this question may sound stupid. Bare with me, I need the info for a project.

    Question: If .Net is Microsoft's answer to J2EE, then what is .Net's version of an EJB (session bean)?

    Source: http://www.livejournal.com/community/aspdotnet/27606.html

  8. Datagrids

    Date: 02/09/05     Keywords: database, sql

    One more thing I need help with.

    I setup a datagrid and it binds itself to the SQL database and outputs ID, Username, Password (md5), Name, Email, Address.

    Now I want to beable to click the ID of one of those and have it bring me to a page thats like an edit page for the clicked table. So it'll let you edit, the name, email, or address, or just delete the whole thing.


    What would be the best way to do this?

    Source: http://www.livejournal.com/community/aspdotnet/27367.html

  9. Validators

    Date: 02/09/05     Keywords: no keywords

    Hey. I have some RequiredFieldValidator's on my site. But I also just have normal links. And the page wont let me browse to other pages (like if I choose not to fillout the form) because the page isn't valid (the forms aren't filled out)


    Any help would be appreciated :)

    [edit] ljcuts disabled?

    Source: http://www.livejournal.com/community/aspdotnet/26927.html

  10. ConnectionString

    Date: 02/07/05     Keywords: database, sql, microsoft

    My connection string keeps giving me the exception:
    "SQL Server does not exist or access denied".

    Here it is: "server=server;database=master;uid=sa;pwd=xxxx"
    I am connecting to another server on the network. I know my uid and pwd are correct, and that sql server is installed and running on that server. My project is in VB.net, not sure if that makes a difference.

    I saw this link: http://support.microsoft.com/kb/328306, but I don't think it should be this difficult. I know I've got it to work before without having to configure DSNs or something like that.
    Any suggestions?

    thanks.

    Source: http://www.livejournal.com/community/aspdotnet/26777.html

  11. file problem

    Date: 02/07/05     Keywords: no keywords

    So I created a project (which ran/debugged fine last week). Now I'm getting an error about a file.

    Unable to open file 'C:\VBclass\Ch02Ex2\Ch02Ex2\obj\Debug\Ch02Ex2.frmMain.resources': The system cannot find the file specified.

    The problem is that the file does exist, but it has the infamous Yellow Triangle with the exclamation point.
    What the hell?

    any ideas?

    Source: http://www.livejournal.com/community/aspdotnet/26492.html

  12. explanation?

    Date: 02/03/05     Keywords: no keywords

    I am using a datagrid's ItemCreated event.
    When I postback the page, this event is firing before my page_load event. It is the first thing in the code behind that is being fired (other than Page_Init).
    Is this right or is my code screwed? I can't imagine what would be in my code to cause this... I've never seen this happen with any other event though.

    Source: http://www.livejournal.com/community/aspdotnet/26328.html

  13. Events and links

    Date: 02/03/05     Keywords: web

    I'm working on this webform that perviously had two buttons that controlled the state of the form. Let's call them "Summary" and "Detail". When you click a button an event fires and the proper actions are taken. All was well and good.

    Now I need to change the interface so that instead of buttons it uses folder tabs as the interface. That is soemthing like this:

     
      Summary    Detail 

    [Summary goes here]


     
     
      Summary    Detail 

    [Detail goes here]


    I'd like clicking on the tabs to fire an event just like clicking on the buttons did. The problem is the tag doesn't have an OnClick event/property just a NavigationURL. Is there a way I can get the links to fire an event on the page (submit the form in a way it will be caught by .NET as an event)? I can't just use a URL as I need to save the values from the form (which is rather complicated and not easily compressed into a url).

    Source: http://www.livejournal.com/community/aspdotnet/25956.html

  14. Visual Studio .NET cuts to the heart of me (humor)

    Date: 02/01/05     Keywords: no keywords

    //------------------------------------------------------------------------------
    //
    // This code was generated by a tool.
    // Runtime Version: 1.1.4322.573
    //
    // Changes to this file may cause incorrect behavior and will be lost if
    // the code is regenerated.
    //

    //------------------------------------------------------------------------------


    ouch! :'-(

    Source: http://www.livejournal.com/community/aspdotnet/25758.html

  15. Exchange Server via .NET?

    Date: 01/31/05     Keywords: web

    (x-posted).

    Hi all,

    I'm new here and in a bit of a time crunch, so forgive me for not searching all the archives yet, but I'm hoping somebody can help me.

    I'm looking for info on how to talk to Exchange Servers with .NET. Specifically, I'd like to get things like the Calendar out of Exchange for my users, via .NET so I can post that info on a website on a different server. If anyone can point me in the direction of good documentation or (better yet) sample code for these sorts of things, I'd really appreciate it.

    Thanks in advance.
    Nolan

    Source: http://www.livejournal.com/community/aspdotnet/25358.html

  16. VBScript???

    Date: 01/27/05     Keywords: html, asp

    Hello!
    I need to write a vbScript function on the client that is called either after or during the server-side Page_Load event. My boss seems to think I can just throw in script tags, like in old ASP, in the middle of my form and it will fire when it renders the html.
    However, it is not firing, but giving me the error:
    Statement cannot appear outside method body.

    I am assuming I have to put my script in an event of some sort, which leaves me with the page_load, which I cannot use, and a control's event, which I cannot use.

    Does anyone know if what my boss is saying is true???

    Thanks.

    Source: http://www.livejournal.com/community/aspdotnet/25171.html

  17. Disappearing Controls

    Date: 01/24/05     Keywords: asp, web

    Can anyone tell me what the hell VS.NET's problem is that half the time it won't recognize controls if they are inside tables?

    I have the following snippet in my .aspx page:

    
      
      
        This account is currently on stop.  Override or Delete?
        
        
      
      
        Reason for deletion:
        
        
        
      
    
    


    This fits with the codebehind declarations:
    Protected WithEvents btnOverride As System.Web.UI.WebControls.Button
    Protected WithEvents btnDelete As System.Web.UI.WebControls.Button
    Protected WithEvents btnContinue As System.Web.UI.WebControls.Button
    Protected WithEvents btnCancel As System.Web.UI.WebControls.Button
    Protected WithEvents lblMessage As System.Web.UI.WebControls.Label
    Protected WithEvents txtReason As System.Web.UI.WebControls.TextBox
    Protected WithEvents pnlStop As System.Web.UI.WebControls.Panel
    Protected WithEvents pnlReason As System.Web.UI.WebControls.Panel
    


    So how come when I try to set "pnlStop.Visible = True", it works fine, but when I set "pnlReason.Visible = True", I get "Object reference not set to an instance of an object"? What is the difference between the two?

    Source: http://www.livejournal.com/community/aspdotnet/25049.html

  18. New to XML

    Date: 01/19/05     Keywords: xml

    Ok, this is my first experience with xml documents really.
    I am calling a function that returns a string, which is my xml document.
    All I want to do is display the info in a datagrid. What is the best way to get
    this file into a dataset?

    Thanks!!

    Source: http://www.livejournal.com/community/aspdotnet/24401.html

  19. Carl Franklin in St. Louis!

    Date: 01/19/05     Keywords: programming, web, spam, microsoft

    I know this is spamming the group, but I really wanted to get the word out (as late as it is) about our great presentation tomorrow. Please accept my apologies.

    ****************************************************
    ST. LOUIS VISUAL BASIC.NET USER GROUP MEETING NOTICE
    ****************************************************

    Date: Wednesday, January 19, 2004
    Time: 6:15 - 9:00 PM

    Asynchronous Programming

    by: CARL FRANKLIN

    Door prizes available!!

    Location: Three City Place, aka The Microsoft Building. From 270, exit Olive, go east. Turn left onto City Place.

    ***************************************************************
    MEETING LOCATION CHANGE
    ***************************************************************

    We are moving. We will be meeting in the main meeting room on the 11th floor of Three CityPlace.

    ***************************************************************
    MEETING DETAILS
    ***************************************************************

    Did you know that you can take advantage of multithreading in the Microsoft .NET Framework without having to explicitly create new Thread objects? You can call web services, print, and do other yawn-inducing tasks asynchronously using the Asynchronous Programming Model in the Framework. There are issues with synchronization, however, especially when calling async methods from a Windows Form. In this talk Carl will walk you through the issues and give you some really useful code that you can implement to make your components thread-safe for Windows Forms applications.

    Some of you might know the name of Carl Franklin from his .Net Rocks internet radio show. You also might be familiar with his training services. No matter how you know the name, now's your chance to meet the man.

    Visit www.stlvbug.org for more information.

    Source: http://www.livejournal.com/community/aspdotnet/24118.html

  20. Tracing

    Date: 01/13/05     Keywords: asp, sql, web

    I'm having some trouble with tracing. I have a static class whose method I call from a page that I'd like to get trace data from. The method looks like:

    public sealed class DbUtils
    {
    static public int ExecuteNonQuery(string sql, string dsn)
    {
      Trace.WriteLine("SQL", sql);
      int rowsAffected;
    
      OdbcConnection db     = new OdbcConnection(dsn);
      db.Open();
      OdbcCommand    cmd    = new OdbcCommand(sql, db);
      rowsAffected = cmd.ExecuteNonQuery();
      db.Close();
      return rowsAffected;
    }
    }
    I've got trace="true" set on both the page I'm looking at and at the application (web.config). I get a lot of trace output at the bottom of the page or by looking at trace.axd, but I never see the information I'm trying to output in this function. Anyone know what I'm missing?

    Update:
    Apparently Page.Trace (from the aspx.cs page) and System.Diagnostics.Trace classes are different beasts. The proper way to make it work is to do this:
    System.Web.HttpContext.Current.Trace.Write("SQL", sql);

    Source: http://www.livejournal.com/community/aspdotnet/23616.html

Previous page  ||  Next page


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home