110 Posted Topics
Re: Generally speaking, trying to access the content page from the master page is a pretty backwards way of doing something. If you have multiple content pages are they all going to implement this behavior? It would be easier, and make more sense, to put the user control into the content … | |
Re: Is the process you use exactly the same for every image or does it handle different file types in different ways? (jpg, png, bmp, etc.) Hard to really know what's going on without having any code to look at. | |
Re: I believe the default timeout for session is 20 minutes, but you can modify that in your web.config if you need to specify a different time span. Also, a note on hericles suggestion, the session_end event is available when using InProc session storage. This is the default option so unless … | |
Re: You could make use of generics. class MyInterfaceFactory { public static T GetClass<T>() where T : myInterface { myInterface temp = null; if (typeof(T) == typeof(ClassOne)) temp = new ClassOne(); else if (typeof(T) == typeof(ClassTwo)) temp = new ClassTwo(); else if (typeof(T) == typeof(ClassThree)) temp = new ClassThree(); return (T)temp; … | |
Re: You're question is pretty vague and leaves a lot to interpretation. Is there a specific problem you are having or are you just wanting someone to hold your hand through making an entire web application? | |
Re: Make sure you have the latest versions of jquery, jquery.validate, and modernizr if you're using them. Some of the older versions will cause telerik to break. > in the code they passe new GridModel(employees) > but this object is not catch in the view. > then how data is catch … | |
Re: I've gone through several of the tutorials on the asp.net/mvc site and not had a problem. Is there a specific issue you're having problems with? | |
Re: you don't get an exe from web applications, the code gets compiled into .dll files which are deployed to the IIS web server. If you want to ensure your connection string is kept safe, then, ideally, you should have your connection string information in your web.config file and then you … | |
Re: If it's not showing the data then the configuration is probable not quite as "well" as it needs to be. But without any code it's going to be impossible for anyone to help you. | |
Re: ok, so what exactly is the question? I understand what you're wanting to accomplish, but where are you in the process? What have you tried so far? What are your results compared to what you expect? Are you getting any errors? | |
Re: There's really not a feasible way to demonstrate an entire n-tier architecture with code in a forum post. It generally consists of multiple projects targeting specific concerns of the application. You could do some research on the Model-View-Controller(MVC) pattern, the Model-View-ViewModel(MVVM) pattern, or the Model-View-Presenter(MVP) pattern to get yourself started. | |
Re: what part are you confused about? If you know nothing at all about asp.net then I would recommend getting a good book on the subject or, even better, take a class if any are available in your area. | |
Re: move the code that sets your textbox values into its own method. Call that method from the page_load event but put it inside an "If IsPostBack" so that it's only called when the page initially loads and not on each postback after that. Also call that method at the end … | |
Re: The gridview, when paging is being used, does not load all data from the database at once. It only loads what is currently being displayed. So the data you selected on any previous page no longer exists as far as the GridView is concerned. If you want to update data … | |
Re: Have you set a breakpoint and debugged it? | |
Re: You can't access ListView2 from the item template because it doesn't exist in the item template. What exactly are you trying to do in the ItemTemplate that you are needing to access ListView2 for? I couldn't quite make out what your goal is from your post. | |
Re: Also, the control you are getting the City value from is a DropDownList, not a TextBox | |
Re: The problem is probably that you're dropdownlist controls are not being rebuilt when the page loads. Before the second button's event gets fired the page will attempt to reload the page using the values saved in viewstate, because you are adding these controls dynamically they will not be available in … | |
Re: have you tried setting the UpdateMode property for each of the UpdatePanels to conditional? [CODE] <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"> [/CODE] The default mode is "Always" which will cause each update panel to also update any other update panels on the page. If you want the update panels to work independently … | |
Re: you're closing your connection after you execute the first query. | |
![]() | Re: are you trying to get the values before the gridview switches to edit mode or do you need to get the values before applying any updates to to the data? Say you click edit, now you get some input controls, you change a couple of values, then click update. Are … |
Re: what have you tried so far? what kind of errors are you getting? | |
Re: you can't directly set properties from control event handlers. They have to point to methods. | |
Re: First if the column in the database only takes two values, one that indicates true and one that indicates false then you should really be using bit for the data type. 1 would be approved and 0 would be unapproved. Then you're gridview would automatically use a checkbox field for … | |
Re: The problem is going to most likely be caused because of viewstate. You are updating the text of the button on the client side which does not update the page's viewstate. When the postback occurs and the page fetches the viewstate data it will not see the updated text value … | |
Re: If you are using a view for your data source and want to perform an update that will affect multiple tables then it would probably be best to use the GridView's OnUpdating event to get the values and update each table individually. | |
Re: 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 | |
Re: can you insert a null value into a column that doesn't allow nulls? I would guess not. You could possibly create some default value to insert that isn't likely to be a value chosen/used by whoever is filling out the form. | |
Re: 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. | |
Re: It really comes down to the lifespan of the data you're needing to keep track of. If you only need the data for the lifespan of the application then you can probably just keep it in memory via class properties, but if you need to persist the data then you'll … | |
Re: 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 … | |
Re: There are quite a few dictionary APIs available for use out there. Just google "dictionary api" and you oughta get some hits. | |
Re: 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 [CODE] foreach (Control ctrl in this.Controls) { if (ctrl is MaskedEditExtender) { (ctrl as MaskedEditExtender).enabled = false; } } [/CODE] | |
Re: [CODE] 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 "; [/CODE] There's no space between "Travel_Class_Capacity" and "Where" | |
Re: have you added a reference to those other projects? | |
Re: If you're using the AjaxControlToolkit you can use a ConfirmButtonExtender [URL="http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/ConfirmButton/ConfirmButton.aspx"]Confirm Button Extender[/URL] | |
Re: you might want to try asking in the php forum | |
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. | |
Re: Do a check along the lines of [CODE] if e.row.rowindex = gridview.editindex e.row.findcontrol(control name) end if [/CODE] 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 … | |
Re: where are you setting the gridview's datasource? | |
Re: 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. [URL="http://wiki.asp.net/page.aspx/1082/dopostback-function/"]Some info on __doPostBack[/URL] … | |
Re: 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 … | |
Re: 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 … | |
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. | |
Re: 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 … | |
Re: 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 … | |
Re: If the number is always the last character and is only a single digit you could do something like this [CODE] int i = 0; if (int.TryParse(command.Last().ToString(), out i)) { } [/CODE] If there's a chance that command might be empty then you'd want to check for that before trying … | |
Re: 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. | |
Re: you should have a web.config in the root directory of the website you're making. This is a separate file from your webforms. |
The End.