| Creating WebControls from dynamic data (2 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| Hi, I am having a lot of trouble creating some webcontrols based on data from my sql database. I need to loop through my data and display a form objects based on the data. Eg: A questions table, for each question I need to write a radiobuttonlist to the page with the question ID as it's identifier so I can get the answer for that question back into the database later. At the moment I am using a re... |
|
| using or imports (4 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| hi folks when do i have to use using .... or imports .... ? Andr¨¦ |
|
| Redirect after session expires (4 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| Hello, I'm looking for a way to automatically redirect a user to a login page when the session expired. Is there a Session.OnExpired event or something? Right now, the page gives an error when the session expires, but I want to get rid of this... Best regards, Tim Musschoot |
|
| Programmatically Changing <head> contents (2 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| I was wondering how you can edit contents in the head section programmatically? Controls Don't work since its they can only be in the body section and I don't want to put asp into the The actual page and want to keep all the logic in the codebehind part. Todd |
|
| Is there a solution? (3 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| Moved from [aspngcontrolscs] to [aspngfreeforall] by Alex Lowe webmaster@asp grandrapids.net Hi all, I have a simple requirement that I cannot seen to solve with ASP.NET. I need to dynamically add a LINK tag to the page HEAD tag. The process is the following: 1 If the Webform contains a HEAD tag then add my dynamic LINK Tag inside this element. 2 if the WebForm doesn't contain a HEAD tag "e.g Not ... |
|
| Hyperlink / onClick event? (3 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| Hi, On my page I have a DataList of items. I would like to have a column with a link in it titled "remove item." When the user clicks this link it runs a procedure/SQL stored procedure to delete the selected item and refreshes the page. I originally had this link as an asp:hyperlink, but I don't want to navigate to another page. What controls can I use OnClick events with, aside from buttons? Than... |
|
| Design-Time Configuration (5 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| Hey all, I'd like to know what the best way to store a connection string that's used at design time would be. I've got some web custom controls that I'd like to load up w/ options from the database; I've figured out how to load them, but I don't want to hard code the connection string (as it will change for each web application the controls are used in). Using web.config doesn't work; I'm assuming... |
|
| Two Data Columns in DropDownList DataTextField (4 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| I need to display two columns from my RDMS in the DataTextField attribute of a DropDownList control for my users to make sense of what they are selecting. In my case it's a clothingStyle and gender. You can't simply place two fields in a comma separated list in that attribute, so what is everyone doing to solve this issue? Thanks in advance, Ryan G. |
|
| Image Files Location on the Web Server (4 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| This is a multi part message in MIME format. InterScan NT MIME Boundary Content Type: multipart/alternative; boundary " NextPart 001 01C20719.965CF065" NextPart 001 01C20719.965CF065 Content Type: text/plain; charset "US ASCII" Content Transfer Encoding: quoted printable I need to load different pictures on a page. I am using this code 20 20 string PicNo 3D Request.QueryString["PicNo"].ToString();... |
|
| can some one explain? (8 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| why in asp.net don't work adding new event ( ) in code for even that already ben posted e.g. protected void x Click(object sender, System.EventArgs e) { Button z new Button(); z.Click new EventHandler(this.z1); } protected void z(object sender, System.EventArgs e) { Label1.Text "new buton is clickt!"); } |
|
| Convert.ToDateTime Question (3 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| Hi, Can anyone tell me how to pass IFormatProvider while formating a data. I have given the sample code I am trying System.Data.SqlTypes.SqlDateTime pContractStartDate System.Data.SqlTypes.SqlDateTime.Null; protected TextBox TextBoxStartDate; pContractStartDate Convert.ToDateTime(TextBoxStartDate.Text); /* If you enter "5/31/2002" in TextBoxStartDate, pContractStartDate will end up in having 5/31/... |
|
| Inserting items into a DropDownList (3 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| Moved from [aspngibuyspy] to [aspngfreeforall] by James Avery javery@deluxeeng.com I use the following code to populate a DropDownList. After the list is populated, I want to insert the value " Choose One " at the top of the list. The following code works perfectly to accomplish this. However, it assigns " Choose One " as both the value and the text of the list item. Is there any way to assign the... |
|
| session answer (2 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| Imports System Imports System.Configuration Imports System.Data Imports System.Data.SqlClient NameSpace Bbs Public Class GetBbs Public Function GetMyanswer() as SqlDataReader Dim MyConnection as new sqlConnection(ConfigurationSettings.AppSettings("StrConnection")) Dim MyCommand as New sqlCommand("Myanswer",MyConnection) MyCommand.CommandType CommandType.StoredProcedure Dim ParameterSessionName as ... |
|
| Change Querystring (3 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| I am trying to get the querystring and alter a value and pass it back in for a response.redirect: Something like this: Dim coll As System.Collections.Specialized.NameValueCollection coll Request.QueryString coll.Set("dc", "profile") Dim strQ As String strQ "default.aspx?" coll response.redirect("default.aspx" coll) 'Operator is not defined for Name Value Collection' ...is what I am getting. Is the... |
|
| How do I get value of only one record? (7 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| I am trying to check what the last CarID value is in my Cars table, but the following code doesn't work... so please can someone tell me how I would just get the last CarID value in the table? I get the error that 'Invalid attempt to read when no data is present', My table does have records in it though. Dim strSQL as String "Select CarID From Cars ORDER BY CarID DESC " Dim objCommand as New SQLCo... |
|
| Help with .net cookies (6 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| I am having a problem with a request.cookies statement using VB.Net. The following code works fine on a classic ASP page: Response.Write (Request.Cookies("mysite").Values("name")) and works OK on a .net site if the cookies exists, however if the cookie does not exists the code fails with the following error: "object reference not set to an instance of an object' I have tried the following, but the... |
|
| Change and Postback events (3 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| Say I have a form with one TextBox and two Buttons. If the value of the TextBox changes, some code should be executed. However, the code to execute should depend on which Button was clicked. In the page execution lifecycle, the Change event (TextBox) will be processed before the Postback event (Button). Is there any nifty way to find out in the Change event handler which button actually caused the... |
|
| Hot Mail Style Listing Part II (3 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| [Could you please put this on the aspngfreeforall list. I really need an answer and unfortunately no one seems to notice the gatagrid postings. Thank you.] Hello All, I finally figured out how to put dynamic headers in a datagrid. It may not be pretty, but using session variables works. Now the next problem. When I go through the datagrid to see if any checkboxes are checked, the code doesn't reco... |
|
| Cookies, Keys and Not Overwriting values (2 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| Hi there, I ve got a cookie with two keys: ( CookieName )( Key1 ) ( CookieName )( Key2 ) If I just update the value of one key using: Response.Cookies( CookieName )( Key1 ) Hello Then the value of Key2 appears to be deleted. Do I have to read in every key each time and then re write them even if I only want to change the value of one key? Kevin. designMe Ltd. Birmingham Telephone: 0121 693 5778 Fa... |
|
| Uploading files in a user control on a normal aspx webform (2 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| Hi, I can upload files okay in a normal aspx page, but when I ve got a page with user controls I can t see how the form tag enctype "multipart/form data" can be set. I don t want to set the whole page because the page is used in many different modes, most of which don t require enctype "multipart/form data". Can this be set per control, or is there no disadvantage to using enctype "multipart/form ... |
|
| Email Validation (8 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| I have strong email validation needs beyond syntactic email validation. I've heard a rumor that there may be an ASP classic routine/library out there that will take an email address, entertain a dialogue with the remove email server to determine if the email address is valid. If there is a routine like that out there, this would reduce my support load and create happier site visitors. Many thanks,... |
|
| Urgent, aspnet_wp.exe (PID: 1624) stopped unexpectedly (3 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| While in the midst in my development environmnet trying a mod to my aspx page, I get the following error: An unhandled exception of type System.ExecutionEngineException occurred in mscorlib.dll The webpage displayed was: Server Application unavailable. The eventlog showed: aspnet wp.exe (PID: 1624) stopped unexpectedly What can I do? Reboot didn't help. Thanks Wolfgang |
|
| radiobuttonlist Onselectedindexchanged event (3 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| This is a multi part message in MIME format. InterScan NT MIME Boundary Content Type: multipart/alternative; boundary " NextPart 000 002F 01C20D68.BBEC2350" NextPart 000 002F 01C20D68.BBEC2350 Content Type: text/plain; charset "big5" Content Transfer Encoding: quoted printable Hi,all I found that it seems the radiobuttonlist onselectedindexchanged event couldn't be handled if you don't submit the ... |
|
| Cache, expirations and dependencies - NOT ANSWERED (2 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| I'm having some troubles with the application cache. I use the following line of code to add an entry to the cache Context.Cache.Add(cacheKey, fileInfo, new CacheDependency(filepath, DateTime.Now.AddMinutes(1)), Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(20), CacheItemPriority.NotRemovable, onRemoveFile); First I create a file and then I cache an object "fileInfo" which contains information ... |
|
| String (7 replies) |
| ASPFriends.com 'aspngfreeforall' list |
| !DOCTYPE HTML PUBLIC " //W3C//DTD HTML 3.2//EN" HTML HEAD META HTTP EQUIV 3D"Content Type" CONTENT 3D"text/html; charset 3Dus ascii" META NAME 3D"Generator" CONTENT 3D"MS Exchange Server version 5.5.2652.35" TITLE String /TITLE /HEAD BODY P FONT SIZE 3D2 Hi all, /FONT /P P FONT SIZE 3D2 I have a upload form . Now I have two txt boxes one for the location of the file and the other for the file name... |
|