nakor77 21 Junior Poster in Training

Since the web is a stateless environment this problem can be a bit difficult to overcome. When you're gridview changes pages you are basically creating a new version of the page. One way you might overcome this would be to store the values in a Session variable. Of course, depending on the amount of data this could be a lot to place in Session. Another option might be to find a way to use a hidden field to store values. Maybe someone else will know of another way.

nakor77 21 Junior Poster in Training

There are quite a few dictionary APIs available for use out there. Just google "dictionary api" and you oughta get some hits.

nakor77 21 Junior Poster in Training

you would probably need to make sure that the control is a MaskedEditExtender before trying to do anything with it, then you can cast the control to the appropriate type

foreach (Control ctrl in this.Controls)
{
    if (ctrl is MaskedEditExtender)
    {
        (ctrl as MaskedEditExtender).enabled = false;
    }
}
nakor77 21 Junior Poster in Training

it's usually best if you try to write the code yourself and then ask for help with specific problems you're having rather than trying to just get someone to do your homework for you

nakor77 21 Junior Poster in Training

you don't need the <td> tags inside an itemtemplate. The gridview's itemtemplate should generate them automatically. Not sure that is what is causing you're problem or not though. Maybe you could post a screenshot or something so we can better tell what it's doing.

nakor77 21 Junior Poster in Training

If you're using the AjaxControlToolkit you can use a ConfirmButtonExtender

Confirm Button Extender

nakor77 21 Junior Poster in Training

have you added a reference to those other projects?

nakor77 21 Junior Poster in Training

yes, there must be a space, but the code you provided is missing one. The code I pasted was a snippet from the code you provided, if you look you'll notice it's missing a space before the WHERE. I wasn't telling you that there shouldn't be a space, I was telling you that you don't currently have a space between those two words

nakor77 21 Junior Poster in Training

you might want to try asking in the php forum

nakor77 21 Junior Poster in Training
string query = "SELECT departure_date, airport_location, seat_capacity,    origin_airport_code, destination_airport_code FROM Flight_Schedule, Airport, Travel_Class_Capacity";
 
                query += "WHERE airport_location.Airport= '" + arrAirport + "' AND airport_location.Airport='" + depAirport + "' AND departure_date.Flight_Schedule='" + depDate + "' AND ";

There's no space between "Travel_Class_Capacity" and "Where"

nakor77 21 Junior Poster in Training

Thanks for the reply but please read the first post. I asked if there was a place specifically for tutorials on this site. I was not asking for external sites.

nakor77 21 Junior Poster in Training

Do a check along the lines of

if e.row.rowindex = gridview.editindex
    e.row.findcontrol(control name)
end if

That syntax isn't correct, but the logic should be

as was said above, if the current row isn't in edit mode then the drop down won't exist for that row and you'll get that error

nakor77 21 Junior Poster in Training

where are you setting the gridview's datasource?

nakor77 21 Junior Poster in Training

I was more referring to member contributed tutorials, say if I decided to write one where would be the appropriate place to put it

nakor77 21 Junior Poster in Training

so far i've mostly just worked on my core at a junior college, with a couple of classes covering C#, ASP.NET, JAVA and C++. I should be moving on to a university next semester though. This semester i'm covering intro to physics, networking and info security. I've also been working full time as a web developer using C#, ASP.NET and SQL Server for a little over a year now. I really enjoy C#. So far most of my experience with ASP.NET has been with WebForms which i'm personally not real fond of. I'd prefer to use either MVC or the newer ASP.NET webpages with razor. Dealing with all of the Page Lifecycle stuff can get a bit annoying when you're working on complex pages.

nakor77 21 Junior Poster in Training

I don't see an "Insert into" statement in any of the code you posted. Could you post the full error message. It should also provide you with the line number where the error is occurring. Also have you tried walking through it in debug mode to see where the error occurs at?

nakor77 21 Junior Poster in Training

If you are wanting a control to inherit from button it sounds more like you're needing to create a custom server control rather than a user control. To do this you'll need to create a new project using ASP.NET Server Control as the project type. If you goole "ASP.NET custom control" or "ASP.NET composite control" you'll find a lot of tutorials/information covering this topic in more detail.

nakor77 21 Junior Poster in Training

Line 37 above: Where is dollarAmount coming from?

Also your Converter class has no property or field for dollarAmount, so Line 41 will cause an error as well since you can't set a property that doesn't exist. Same thing when trying to use convert.breakdown, it doesn't exist in the Converter class

nakor77 21 Junior Poster in Training

Is there not a location here for ASP.NET Tutorials? I see the one for code snippets, is that supposed to be for both snippets and tutorials? I've seen a couple of the languages with a specific tab for tutorials but haven't found one in the ASP.NET forum yet.

nakor77 21 Junior Poster in Training

if you know for sure that textbox40.Text is a numeric value then it would probably help to post the code for check.PostalCodeChecking() to see what's going on inside that method. But you really should create an int variable and set it to the value of TextBox40 and then pass that variable into the method. It provides for better error checking. Also, do you really have 40 TextBoxes labeled as TextBox1, TextBox2, etc? If so you should really look into naming your controls with meaningful names, something that gives a hint of what the control is being used for. It makes debugging and maintaining your applications a lot simpler.

nakor77 21 Junior Poster in Training

what is the exact problem you are having? I doubt many people are going to code an entire solution for you when you haven't provided any code yourself. If you have tried to get this to work and are having problems then please post the appropriate code along with any error messages you are receiving.

nakor77 21 Junior Poster in Training

with the information you've provided all anyone is going to be able to tell you is that the connection is closing unexpectedly. I would guess you're using C# since you posted in the C# forum but I could be wrong since you haven't even provided that much information.

nakor77 21 Junior Poster in Training

you should have a web.config in the root directory of the website you're making. This is a separate file from your webforms.

nakor77 21 Junior Poster in Training

If the number is always the last character and is only a single digit you could do something like this

int i = 0;

if (int.TryParse(command.Last().ToString(), out i))
{

}

If there's a chance that command might be empty then you'd want to check for that before trying to call int.TryParse on it

You could also use command.First() to get the char value of the first character in the string. You'll need to add a "using System.Linq" for these methods if you don't already have it.

ddanbe commented: Not Bad! +14
nakor77 21 Junior Poster in Training

What's inside the textbox?

nakor77 21 Junior Poster in Training

The only reason I can think of without knowing what your BaseBO class looks like is that you do not have a constructor for that class which takes no parameters. The new() constraint requires that whatever type T is it must have a parameterless constructor.

nakor77 21 Junior Poster in Training

Name: Jon
Occupation: Programmer (Web Dev)

I work primarily in C# and ASP.NET WebForms.

Education: Currently pursuing a CS degree, it seems to be evading me so far though.

nakor77 21 Junior Poster in Training

if Variables inherited from Methods then that would work. However if Methods inherits from Variables then you would need to cast v as a Methods type.

Methods m = (Methods)v;

If neither inherit from the other then this will not work.

nakor77 21 Junior Poster in Training

Often an example can do more to explain than an explanation. I tried to comment the example to explain what is going on as much as possible.

public class Parent
    {
        // public properties
        public int X { get; set; }
        public int Y { get; set; }

        // protected properties
        protected int Z { get { return 75; } }

        // private properties
        private int W { get { return 0; } }
    }

    public class Child : Parent
    {
        // the child object has access to protected properties
        public int Z { get { return base.Z; } }

        // This causes an error because private
        // properties are not accessible outside
        // of the class in which they are created
        public int W { get { return base.W; } }
    }

An example of using these classes in a simple console app

// Create a new child object and set its X and Y values
            Child child = new Child();
            child.X = 25;
            child.Y = 50;

            Console.WriteLine("child.X: " + child.X);
            Console.WriteLine("child.Y: " + child.Y);

            // A parent object can be created directly 
            // from an instance of a Child object
            Parent parent = child;
            Console.WriteLine("parent.X: " + parent.X);
            Console.WriteLine("parent.Y: " + parent.Y);
            
            // This will cause an error since Z is protected
            // it is only accessible by the class and classes
            // that inherit from it
            Console.WriteLine("parent.Z: " + parent.Z);

            // This will cause an error because W is private
            // and only accessible within …
nakor77 21 Junior Poster in Training

You may need to cast the returned control as a TextBox

t = CType(me.findcontrol("textbox" & i), TextBox)

you may also want to check and make sure that t is not Nothing before trying to call its Text property. If the control is not found then t will not be set to a value and you'll get the "Object Reference not set..." error

nakor77 21 Junior Poster in Training

It is possible to call do a postback to the server from javascript using "__doPostBack()", but it would be basically the same as using a server control to create the postback. Another option might be to use javascript/jquery to make a call to a page webmethod.

Some info on __doPostBack

Could you provide a little more information on what you're trying to accomplish?

nakor77 21 Junior Poster in Training

WebForms more closely resembles developing in windows forms than MVC does. You can drag controls onto the page and things like that which may be more comfortable for you if you're not very familiar with writing html. Although, if you're not then I would suggest getting familiar with it before you go much farther in developing web applications.

nakor77 21 Junior Poster in Training

you can use MVC 2 with Visual Studio 2008

it can be downloaded from Microsoft here.

The difference of using MVC and WebForms is more of a personal preference than it is a matter of industry standard. If I had the choice I would prefer to use MVC because it gives me more control of the html that is created and I like the Model, View, Controller setup. It's also nice to get away from the Page Life Cycle and making sure that you are performing the right steps in the right events that can be a real pain in some WebForm projects. Unfortunately I get to use MVC very little since it's not available to us where I work.

nakor77 21 Junior Poster in Training

You should be able to call the webservice using a relative url

url: "WebService.asmx/HelloWorld"

the content type should look like this

contentType: "application/json; charset=utf-8"

and you may need to specify the dataType

dataType: "json"

also, your success function needs fixed

success: function(msg){
    alert(msg); // this may need to be msg.d instead of just msg
}
nakor77 21 Junior Poster in Training

you might try replacing localhost with 127.0.0.1

You might also try going through the MySQL Causes of Access Denied Errors page.

nakor77 21 Junior Poster in Training

Could you post the .aspx code for this? It's hard to figure out exactly what's going on from your description. You should probably be able to use the GridView RowCommand event to update the values of the checkboxes before opening the popup, this way you can determine which row is attempting to open the popup. However, it's hard to give any specific help without knowing more about how the page is set up and what the code is doing.