Server Application times out


By "it runs for 3 minutes" do you mean its doing processing and not showing a page for 3 minutes

If so, you could have some memory leak and are actually bringing down your web server!

Could you give more detail of what your page is actually doing

D'Arcy , 1 to 3 HOURS!

ok...we should look at the architecture of this then, because a web app may not be what you want here. Let me explain:

Each session has a timeout value. This is necessary because if it didn't, your webserver would get jammed up with processing and storing variables, and it would cease to function (usually showing a familiar Server Application Unavailable error). The idea though is that if someone is actively interacting with the site, then the session stays live. But if inactivity happens, the session will die.

Whats happening in your case is that you're asp.net page is calling some code that is doing some MAJOR processing. The timeout of your IIS is probably kicking in before the processing is complete, effectively killing your app.

HOWEVER, I wouldn't suggest bumping up your timout to 3 hours, because that means that if I log into your site, and close my browser, unless you can catch that and abandon my session, my session will stay active for 3 HOURS! Multiply a few hundred users, if not thousands depending on usage and traffic, and your site won't last too long.

So here are some options for you:
1. Create a Windows Service. This is a program that runs in the background of the server. When you need some processing done, you could have your aspx page pass some vars to the service and get it going, while telling your users to "come back later" to retrieve their data. This will do a few things:
a. It will take the processing load off of IIS
b. You're users won't have to have their browser open for 3 hours just to see the results; they can come back later.

2. If its something like report generation, try and automate the process during non-busy hours.
i.e. if a financial report is run every thursday morning, instead of the users having to request it, just have a service or some other application automatically crate the report at a pre-determined time (like 2 am for instance), so all the users do in the morning is grab the finished report (which also was processed during a non-busy time, so it probably won't take as long)

If you'd like more insight on how to rectify this, let us know a bit more detail about what it is you're trying to do (and why its taking 3 hours max to do it; although I'm guessing its report related)

hth

D'Arcy
Posted On: Wednesday 2nd of January 2013 02:10:55 AM Total Views:  566
View Complete with Replies

RELATED TOPICS OF ASP.NET PROGRAMMING LANGUAGE




This Update will not work!!

"INPUT STRING NOT CORRECT" \t\t\tPO_Number being my Key Field...would this cause a problem\t\t\t\tDim strSQL As String = _\t\t"UPDATE [Table] SET [Freight] = @Freight," & _\t\t"[Total] = @Total WHERE PO_Number = '" & lblPO.Text & "'"\t\t\t\tDim cn As SqlConnection = New SqlConnection()\t\t\t\tDim cmdExp As SqlCommand\t\t\t\tcn.Open()\t\t\t\tcmdExp = New SqlCommand(strSQL, cn)\t\t\t\tDim FreightParam As New SqlParameter("@Freight", SqlDbType.Money)\t\t\t\tDim TotalParam As New SqlParameter("@Total", SqlDbType.Money)\t\t\t\tFreightParam.Value = txtFreight.Text\t\t\t\tTotalParam.Value = lblPOTotal.Text\t\t\t\tcmdExp.Parameters.Add(FreightParam)\t\t\t\tcmdExp.Parameters.Add(TotalParam)\t\t\t\tcmdExp.ExecuteNonQuery()
VIEWS ON THIS POST

195

Posted on:

Tuesday 1st January 2013
View Replies!

Message Box in ASP.Net

I have created this simple message box (from 4Guysfromrolla.com) but I am not sure how to edit it to display several lines of messages rather than just one long line of text, or one single line of text.Help!\tMe.LinkButton2.Attributes.Add("onclick", _\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"return confirm('What are the major steps of the process where improvement is needed'));") This is where I need a line break and then 2nd, 3rd and 4th line of text...
VIEWS ON THIS POST

274

Posted on:

Tuesday 1st January 2013
View Replies!

Starting From Scratch

First a little background information.\tI currently work as a database analyst and use mostly SQL Server, and Crystal Reports.\tIt has been recommended by a friend of my boss and I that we look into using ASP for some of our report/data deployment.\tI have a little experience with VB.NET but other than that no real programming or web development experience.\tI would like to see about learning ASP.NET mostly for personal development and hopefully fatten the paycheck as a result of the new found skills.With my VERY limited experience where would be a good place to startI did a search but didnt find anything where a person was starting with as few skills as my self
VIEWS ON THIS POST

182

Posted on:

Tuesday 1st January 2013
View Replies!

How can I extract information from an image header?

I am trying to get information from an image that contains a header with parsable fields.\tDoes anybody know how I can extract information from the header of an image\tI have never done this before, but know it can be done
VIEWS ON THIS POST

226

Posted on:

Tuesday 1st January 2013
View Replies!

File Security and Aspx pages Httphandler

I have\tthis scenario :-userid 66 has folder/66userid 75 has a folder/75do not want 66 to be able to access 75's files by changeing url.After logging in, the user has an aspx page has a list of hyperlinks\tto different\tfiles Example(http://comm/66/test.doc)I do not want them to be able to change\tthe url to\thttp://comm/75/test.doc which would be for another user.aspx pages are protected but doc,pdf,txt files are not.I created a custom\thttphandler but keep getting an "Unrecognized configuration section 'HttpHandlers'" Error with it.I Would ask for any suggestions as to how to secure these files.I will paste my code if anyone is willing to help me.
VIEWS ON THIS POST

203

Posted on:

Tuesday 1st January 2013
View Replies!

Display multiple records per row in a datagrid

Is it possible to display multiple records per row in a datagridI want to display 3 records per row and want to use a datagrid in order to take advantage of the built-in paging
VIEWS ON THIS POST

206

Posted on:

Tuesday 1st January 2013
View Replies!

Tag Completion if Visual Studio

I'm encountering a strange problem in Visual Studio and I was hoping someone could shed some light on it.\tWhenever I create a new file and save it as a *.aspx file all tag completion works fine.\tHowever, once I close the file and reopen it for the first time (and every time after that) the tag completion feature goes away which leads to a lot of extra typing and errors.Can someone explain why this is happening and how to fix it\t
VIEWS ON THIS POST

197

Posted on:

Tuesday 1st January 2013
View Replies!

viewstate

What's the correct/best way to to persist data across postbacks using ViewState\tI have the following web control implemented in C#:The page has 2 rollover buttons that are used to step through all the images in a image folder.\tThe viewstate seems to be somewhat working, but when I debug the page in Visual Studio and put in a breakpoint where I read the value of ImgNum, I notice that ImgNum keeps coming back as "0".\tThis is strange because it does seem to be saving the state of ImgNum even though debugging always shows it to be "0".\tCould someone please take a look at my code and show me the 'correct' way to implement ViewState
VIEWS ON THIS POST

129

Posted on:

Tuesday 1st January 2013
View Replies!

Joining tables in Dataset

I need to join tables returned in a dataset.Please do not respond to do the join in SQL - suffice it to say - that aint gonna happen.As a sample - dataset will return 2 tablestable(0)CategoryID intCategoryName vartable(1)ItemID intItemName varCategoryID intI will need to join table0 with table1 on CategoryID. After all is said and done will be displaying Categoryname as top level and ItemName as next level in treeview.Can anyone give me a quick sample / overview of how this could be accomplishedThank you !! PHI was walking home one night and a guy hammering on a roof called me a paranoid little weirdo. In morse code. -Emo Phillips
VIEWS ON THIS POST

262

Posted on:

Tuesday 1st January 2013
View Replies!

Need Help Screening New Hire

Hi !\tI'm a newbie regarding Visual Studio.net and am in the process of interviewing a developer for a project that is 3/4 complete.\tI need someone up to speed very quick, and am interested if anyone can help me with some good questions that will weed out the applicants that are BSing.\tI've learned in the past that a resume is only worth the ink it's printed on.\tIf anyone has any good suggestions, I'd love to hear them.\tBTW - if anyone is in the Dallas area and is VERY good at ASP.net, C#, and Crystal Reports.net, feel free to shoot me your resume.\tThis is for the next month or two in the Fort Worth TX area.\tOtherwise, I'd appreciate the help with the screening
VIEWS ON THIS POST

196

Posted on:

Tuesday 1st January 2013
View Replies!

Extend Session Variable Timeout?

Is there a way to extend the timeout of a session variable Jason MeckleyDatabase AnalystWITF
VIEWS ON THIS POST

223

Posted on:

Tuesday 1st January 2013
View Replies!

check box question

How do I capture the click event of the check box so that every time the box is ticked a text box is enabled, and every time the box is unticked a text box is disabled
VIEWS ON THIS POST

326

Posted on:

Tuesday 1st January 2013
View Replies!

Error handling - Can anyone suggest a good article?

I have made a big mistake and left my error handling for last in my project.\tIt can't be put off any longer, and I was hoping someone could point me to a good, comprehensive tutorial or FAQ on the subject.\tI know a mishmash of stuff, but I would like to see the standard, best practice approach.
VIEWS ON THIS POST

244

Posted on:

Tuesday 1st January 2013
View Replies!

Problem with File permissions

I have a program which allows the ser to selct a file on his local machine, and then copy it to the Web server.\tTHis works fine (using PostedFile.SaveAs).\tBut when the same program tries to Delete the file, using file.delete, the server says access denied Any idea how to fix this
VIEWS ON THIS POST

148

Posted on:

Tuesday 1st January 2013
View Replies!

Security privilege checking - how?

ok I want to check whether a user has access to a file on a network share. I have tried using impersonate and seeing if the file exists but that always says the file exists which is a little annoying but hey. How can I do this The application itself is a search page with the generalisation which of course is displaying no matter what. The file cannot be opened by the user either directly or by the web site but the generalisation still appears :(Help please
VIEWS ON THIS POST

117

Posted on:

Tuesday 1st January 2013
View Replies!

Some code debugs, others won't

Hi allGot a bit of a funny one here. I have just created a new .aspx page and, although I put breakpoints in, it does not actually break! Sometimes.Here's the strange part. If I but a breakpoint in the Page_load event, it will break. If I put a breakpoint in one of my button_click events, it doesn't break - but the code does run (I put in a whole lot of Response.Writes to test) and there is code in the IntializeComponent event to cater for the button_click event.What's really throwing me is that the Page_load event stops at the break point!Does anyone know what's going on here, please
VIEWS ON THIS POST

222

Posted on:

Tuesday 1st January 2013
View Replies!

search word documents

any idea on something to search through a virtual directory of word (and some excel, but not necessary to search) documents\ti'd also rather not use ms index server.i'm creating an online document management system, and i would rather not keep an index of keywords for each document in the database.\ti'd like to be able to point to a directory and tell it to search through the word documents for a phrase.any suggestions would be much appreciated! mike griffith----------------------------mgriffith@lauren.commdg12@po.cwru.edu
VIEWS ON THIS POST

321

Posted on:

Tuesday 1st January 2013
View Replies!

Controls on WebUserControls

Newbie here so feel free to laugh ...I created a webusercontrol based on a GridView, so I now have a 'myGridView' WebUserControl.Go to a new webform, add the control, and voila .. I now have my modified GV.But ... no smarttag option to set datasource or autoformat etc.There is an option to 'Edit User Control' but that changes the source file .. and to be honest that scared me, is it possible to block that option I don't want my source file being altered by error !So have I missed something realy obvious, or am\tjust barking up the wrong tree altogether Can I create a WUC giving all the normal functionality of a GridView, that can be used multiple times within a page as seperate instances with seperate datasources Many
VIEWS ON THIS POST

187

Posted on:

Tuesday 1st January 2013
View Replies!

upload asking for log in

I have an upload control in a subdirectory under a website that is anonymous. The subdirectory has integrated auth enabled and in my web.config I configured identity impersonate = true and allowed authenticated users on this subdirectory. Need this to have authentication on it so can communicate securely with database. The file under here can be accessed by anyone on our network.Within this subdirectory there is an admin folder. This admin folder should only be accessible by a domain group I set up locally on the server. I created a section in the web.config for this admin directory to allow roles = "domainGroupName" and deny all other users. The admin folder contains an upload feature and when I try to upload a file it asks me to log in then I receive access denied to the documents directory, which is located under the same subdirectory as the admin folder. I have set IUSR, Network Service, Asp.Net user, and domainGroup all have write access to the folder. Also enabled write access in IIS to no avail. This does work when I create this part of the application as its own site under IIS but not as part of this anonymous site which is where the customer would like it. Is it possible in .net to upload files under a subdiretory that requires integrated under an anonymous site I have tried creating the subdirectory as an application but then .net wants me to recreate the masterpages, css, etc in the subdirectory since it then sees it as a separate app. At that point I might as well keep it a separate site and hard code the links.Any one out there have any ideas
VIEWS ON THIS POST

218

Posted on:

Tuesday 1st January 2013
View Replies!

DB Grid - input Text Box not capturing user input value

I am facing a strange behavior which I am not able to find the solution.I have a Gridview to show data from my database and after click on Edit, I will allow certain fields to be modified.However, when I click Update, some of the fields not able to accept the new value and some field are taking new values + old values, thus making it wrong.Let's say, my txtComments original data is empty string.Now, I click Edit, and Update without modifying the data in txtComments, I will get ",,"Then I click Edit again and Update without modifying the data in txtComments, I will get\t",,,,,,,,"Let's say, my txtComments original data is "123"Now, I click Edit, and Update without replace the data in txtComments to 456, I will get 456,123,123 Other than that I am not able to read new value for txtOverrideMin, txtOverrideMin, txtOverrideMaxIt is pretty strange and I try to debug it and see where the values are from, some how no avail.Here are some of my codes, I hope you can spot where it goes wrong
VIEWS ON THIS POST

199

Posted on:

Tuesday 1st January 2013
View Replies!

ListBox selectedvalue

I have a listbox that display a select distinct field from SQL and I have a button when clicked, it supposed to copy the content of the listbox into a textbox, but it didnot, it seems like I have the select the value first then click copy. Is there a way to default it to automatically select the content of the listboxthe code of my button clickedProtected Sub CopyButton_Click()Address.Text = OldAddressListBox.SelectedValueThank for help
VIEWS ON THIS POST

245

Posted on:

Tuesday 1st January 2013
View Replies!

Other databases

Is it true that in order to use the full functionality of the new datacontrols (formview, gridview, etc) you have to maintain the data in a SQL server/express database I have tables in a VFP database and can't seem to get them to work with a proper connection definition for update/delete/insert.Or am I just a clutz , Someone correct me if I'm wrong (and I most likely am), but I don't think you can use the "" operator in ADO.Net. I think you're supposed to use named parameters like "@user_id" now.
VIEWS ON THIS POST

143

Posted on:

Tuesday 1st January 2013
View Replies!

Issue with Dynamic Dependent Drop Down Menu

you have c# code, and i normally work with vb.net, but where is your HANDLES after the event functionin vb you havePublic Sub xx_click(sender, e) handles xx.click -Sometimes the answer to your question is the hack that works
VIEWS ON THIS POST

294

Posted on:

Wednesday 2nd January 2013
View Replies!

Create a simple web service

I am new to web services and I am trying to figure out this best approach to a project - so please forgive meif the solution is obvious. What I need to do is create a page for a client that will show on the clients site,yet will be hosted by me (it has to be done this way - no choice).This is how it's suppose to work 1. Client's user logs in to their account on client site2. Once the credentials have been verified they are brought to account page.3. On this account page is a link to account details - The details will be provided by me.4. Now when the user clicks the link to account details, I will need to grab the users sign-in name, \tand, using a web method.5. The username and password will be verified for validity.6. If the user is valid I will then call another web method, passing the account number to get\tthe account details.7. I will take the XML from the details and display it on a page (the page that will be viewed in iframe on client's side).Okay, I am totally lost on the whole communication flow. What I have done so far is created a test page the has a link in it. When the link is clicked the code calls a web method that in turn calls a previously created web method that checks credentials. I parse out the returned XML nodes and grab the users account number.I pass this account number off to a function within the same web service that calls yet another previously created web method that grabs the account details. Now I need to place these details in a page. How do I get these details in a page Do I add a webform to the web service projectAny responses would be greatly appreciated!Thx,Q
VIEWS ON THIS POST

181

Posted on:

Wednesday 2nd January 2013
View Replies!

Decoding base-64 data into a pdf file

,I have the following (simplified for readability purposes) xml file:CODE ... in there there's a base-64 encoded pdf file. what I need to do is to decode this base-64 encoded file into an actula pdf file where my users can actually view... Any idea on how to go about it
VIEWS ON THIS POST

486

Posted on:

Wednesday 2nd January 2013
View Replies!

Strange Event Behavior

Hi all,I have a page with various routines running on SelectedIndexChanged. has been working well. This morning I added another such event for a new dropdown. Autopostback is true. But the event for the dropdown does not fire. HOWEVER, it fires at the end of some of the other dropdown's events.\tHere is some code. The dd_Product1 does its thing inside its event. Notice it has no interaction with dd_Instrument. But ddInstrument_pattern_SelectedIndexChanged runs automatically after ddProduct1_pattern_SelectedIndexChanged runs.\tWhen the Instrument dropdown is changed by a user, nothing happens, when the Product dropdown is changed, both routines run....------------------------------------Protected Sub ddProduct1_pattern_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddProduct1_pattern.SelectedIndexChanged\t\t\t\tTry\t\t\t\t\t\tsql_conn = deal.sql_conn\t\t\t\t\t\t'prepare command object\t\t\t\t\t\tWith sql_command\t\t\t\t\t\t\t\t.Connection = sql_conn\t\t\t\t\t\t\t\t.CommandType = CommandType.StoredProcedure\t\t\t\t\t\t\t\t.CommandText = "[sp_get_settlement_indexes]"\t\t\t\t\t\t\t\t.Parameters.Clear()\t\t\t\t\t\t\t\tcreate_parm(sql_command, "@productid", SqlDbType.Int, ddProduct1_pattern.SelectedValue)\t\t\t\t\t\tEnd With\t\t\t\t\t\tda.SelectCommand = sql_command\t\t\t\t\t\tda.Fill(ds)\t\t\t\t\t\tWith dd_SettlementIndex_pattern\t\t\t\t\t\t\t\t.AutoPostBack = True\t\t\t\t\t\t\t\t.Items.Clear()\t\t\t\t\t\t\t\t.DataSource = ds.Tables(0)\t\t\t\t\t\t\t\t.DataTextField = ds.Tables(0).Columns("SettlementIndexName").ToString\t\t\t\t\t\t\t\t.DataValueField = ds.Tables(0).Columns("SettlementIndexId").ToString\t\t\t\t\t\t\t\t.DataBind()\t\t\t\t\t\t\t\tDim item As ListItem = New ListItem("Choose Settlement Index.", "None")\t\t\t\t\t\t\t\t.Items.Insert(0, item)\t\t\t\t\t\tEnd With\t\t\t\t\t\tds.Clear()\t\t\t\t\t\tda.Dispose()\t\t\t\t\t\tds.Dispose()\t\t\t\t\t\tWith sql_command\t\t\t\t\t\t\t\t.Connection = sql_conn\t\t\t\t\t\t\t\t.CommandType = CommandType.StoredProcedure\t\t\t\t\t\t\t\t.CommandText = "[sp_get_product_rules]"\t\t\t\t\t\t\t\t.Parameters.Clear()\t\t\t\t\t\t\t\tcreate_parm(sql_command, "@productid", SqlDbType.Int, ddProduct1_pattern.SelectedValue)\t\t\t\t\t\tEnd With\t\t\t\t\t\tda.SelectCommand = sql_command\t\t\t\t\t\tda.Fill(ds)\t\t\t\t\t\tIf ds.Tables(0).Rows(0).Item("SingleDelivery") = True Then\t\t\t\t\t\t\t\tMe.txtDeliveryDate_pattern.Visible = True\t\t\t\t\t\t\t\tMe.TableHeaderCell_DeliveryDate.Text = "Delivery Date"\t\t\t\t\t\t\t\tMe.ddDeliveryLocation_pattern.Visible = True\t\t\t\t\t\t\t\tMe.TableHeaderCell_DeliveryLocation.Text = "Delivery Location"\t\t\t\t\t\tElse\t\t\t\t\t\t\t\tMe.txtDeliveryDate_pattern.Visible = False\t\t\t\t\t\t\t\tMe.TableHeaderCell_DeliveryDate.Text = ""\t\t\t\t\t\t\t\tMe.ddDeliveryLocation_pattern.Visible = False\t\t\t\t\t\t\t\tMe.TableHeaderCell_DeliveryLocation.Text = ""\t\t\t\t\t\tEnd If\t\t\t\t\t\ttxtUOM.Text = ds.Tables(0).Rows(0).Item("UOMName")\t\t\t\t\t\ttxtUOMID.Text = ds.Tables(0).Rows(0).Item("UOMId")\t\t\t\t\t\t'----------------------------\t\t\t\t\t\t\t\t\tCatch\t\t\t\t\t\tResponse.Write("Problem in ddProduct1_pattern_SelectedIndexChanged in NewDeal. Contact IT.")\t\t\t\tEnd Try\t\tEnd Sub-----------\tand....Protected Sub ddInstrument_pattern_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddInstrument_pattern.SelectedIndexChanged\t\t\t\tResponse.Write("here")\t\t\t\tIf InStr(ddInstrument_pattern.SelectedItem.ToString, "Put") = 1 Or InStr(ddInstrument_pattern.SelectedItem.ToString, "put") = 1 Or InStr(ddInstrument_pattern.SelectedItem.ToString, "Call") = 1 Or InStr(ddInstrument_pattern.SelectedItem.ToString, "call") = 1 Then\t\t\t\t\t\tMe.txtStrike_pattern.Visible = True\t\t\t\t\t\tMe.TableHeaderCell_Strike.Text = "Strike"\t\t\t\t\t\tMe.TableHeaderCell_Price.Text = "Premium"\t\t\t\tElse\t\t\t\t\t\tMe.txtStrike_pattern.Visible = False\t\t\t\t\t\tMe.TableHeaderCell_Strike.Text = ""\t\t\t\t\t\tMe.TableHeaderCell_Price.Text = "Price"\t\t\t\tEnd If\t\t\t\t'---------------------------------------\t\t\t\tIf InStr(ddInstrument_pattern.SelectedItem.ToString, "Index") = 1 Or InStr(ddInstrument_pattern.SelectedItem.ToString, "index") = 1 Or InStr(ddInstrument_pattern.SelectedItem.ToString, "Indx") = 1 Then\t\t\t\t\t\tMe.TableHeaderCell_Price.Text = "Price Adder"\t\t\t\tElse\t\t\t\t\t\tMe.TableHeaderCell_Price.Text = "Price"\t\t\t\tEnd If\t\tEnd SubNote that the stored procedures called in the first routine have nothing to do with the Instrument dropdown
VIEWS ON THIS POST

221

Posted on:

Wednesday 2nd January 2013
View Replies!

Multiple dependent dynamic DropDownLists problem

I have three DropDownLists.\tThe second DropDownList is dependent upon the answer of the first DropDownList, and the third is dependent upon the first two.The problem is that after the user tries to select a value in the first dropdown, it continues to use only the first value selected.\tI've seen numerous help pages on this that all recommend using the !Page.IsPostBack for the DataBind, but this doesn't work when the values for the dropdowns will change.Has anyone run into this problem before and if so, how did you solve it\tI'm using the AutoPostBack property in the DropDownList to submit the values to the form and change the values of the other dropdowns accordingly.I can supply code if need be
VIEWS ON THIS POST

257

Posted on:

Wednesday 2nd January 2013
View Replies!

Running a .aspx page in IIS 5.0

I have a windows 2000 server running IIS 5.0. What configuation changes do I have to make to run a .aspx page on the server. I have the .net 2.0 environment and visual studio 2005 on my devoloper machine, which is XP pro. I used VWD to create my web pages. How do I get it to run through IIS. Right now I get the following error.Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable.\tPlease hit the "Refresh" button in your web browser to retry your request. Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur. "The event log dosent give any thing useful to me.
VIEWS ON THIS POST

259

Posted on:

Wednesday 2nd January 2013
View Replies!

Creating a dataTable from XmlTextReader

Hi all,I'm trying to create 3 DataTables and add them to a DataSet to then do querying between them.\tMy source of data is from XmlTextReader.I'm able to create a DataSet no problem from the XmlTextReader via:ds.ReadXml(xr);but I'm not sure how to create a DataTable.\tCan someone shed some light on this
VIEWS ON THIS POST

186

Posted on:

Wednesday 2nd January 2013
View Replies!

Binding to DropDownList problems

i'm having problems binding to the DropDownList control.\tHere's my code:CODEand here's my code behind (Page_Load event handler):CODEDim lstCategoryID As DropDownList = CType(FormView1.FindControl("lstCategoryID"), DropDownList)lstCategoryID.DataSource = Utilities.GetCategoriesList()lstCategoryID.DataBind()When i run the application i get the error:'lstCategoryID' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: valueThis seems a strange error since there is a value in the DropDownList which is the same as the value i am trying to bind to. I think it might be something to do with me loading in the contents of the DropDownList with the Page_Load event handler (since i have had no problems with dropdownlists with static options).\tI have also tried putting in the Page_Init event handler but this did not work either.Appreciate if someone could help.
VIEWS ON THIS POST

137

Posted on:

Wednesday 2nd January 2013
View Replies!

regular expression for credit card expiration date

I've found some sample regexs for dates,\tbut they dont work in my validator.\tDoes an yone have one they could share that will work with my asp.net reg expression validator
VIEWS ON THIS POST

185

Posted on:

Wednesday 2nd January 2013
View Replies!

display radiobuttonlist in groups

Is there a way to change the way a radiobuttonlist displays, so that it will be broken up into groups If so howIn other words instead of this:O Option 1O Option 2O Option 3O Option 4We would have this:Group 1\tO Option 1\tO Option 2Group 2\tO Option 3\tO Option 4I still only want 1 of these 4 options to be chosen, I just want it displayed in groups. mwa
VIEWS ON THIS POST

213

Posted on:

Wednesday 2nd January 2013
View Replies!

Creating ASP.NET/HTML pages 100% programmatically

Is it a possible create HTML pages 100% programmatically\tParticularly in VS2005, this would mean creating an empty .html file, putting it into a member pages folder, "figuring out" and adding HTML to the file, closing it, and associating it with a code behind file.I'm not sure WHY I would do it, but I would like to know if it's possible to do all these step(and, if it's in fact a "standard practice" in some situations)
VIEWS ON THIS POST

573

Posted on:

Wednesday 2nd January 2013
View Replies!

anchor after autopost

I created a long survey page in c#.netAfter click a control with an autopost the page seems to scroll all the way up to the begining. How can I set it, so that it will stay in t he same position of control with the autopost
VIEWS ON THIS POST

127

Posted on:

Wednesday 2nd January 2013
View Replies!

post structure of array from asp.net page to external web service

(Type your message here)--------------------------------From: zhou yuhiI am working on consume coldfusion service in asp.net page. the web service has a required parameter of structure of array.I did the follow codestruct param {public string action;public string @class;public string target;}void cfSetSandBox(object sender, EventArgs e){CF7SandBox aCF7SandBox;param [] rules=new param[1];rules[0].action="read";rules[0].@class="java.util.PropertyPermission ";rules[0].target="*";Object aObject = aCF7SandBox.setSecuritySandbox(/*adminpassword*/"password", /*String*/"e:\\wwwroot\\testing", /*Object[]*/rules);}but i got this error message Compiler Error Message: CS1502: The best overloaded method match for 'CF7SandBox.setSecuritySandbox(string, string, object[])' has some invalid argumentsthe error line is Object aObject = aCF7SandBox.setSecuritySandbox(/*String*/"atari2600", /*String*/"e:\\wwwroot\\testing", /*Object[]*/rules);any guru know where is problem is
VIEWS ON THIS POST

142

Posted on:

Wednesday 2nd January 2013
View Replies!

How do I get control position?

I have been trying to get the position of a control by usinghlStart.Style.Item("left")in the page_load procedure but it is not working.\tIs there another way to get the position
VIEWS ON THIS POST

159

Posted on:

Wednesday 2nd January 2013
View Replies!

insert issue with sql database

I am trying to insert into a sql database various text fields into table fields.\tthe database can have multiple records of being the same with the exception of the unique ID.\thowever if I try to insert a record that is identical I get a UNIQUE KEY error as follows:Error inserting record! The statement has been terminated. Violation of UNIQUE KEY constraint 'IX_t_user_name'. Cannot insert duplicate key in object 'eventreg'how can this be done
VIEWS ON THIS POST

119

Posted on:

Wednesday 2nd January 2013
View Replies!

Redirect into a frame

How do you use response.redirect to redirect the target page into one frame from anotherI am familar to the href target argument, but am having a blockage with redirect.Rob
VIEWS ON THIS POST

311

Posted on:

Wednesday 2nd January 2013
View Replies!

Split Delimited String + passing a multi-dimentional array to function

Hi I am writing a function (below) to split a delimited string who's fields are delimited by '...' and records delimited by vbcrlf.I have two problems:Firstly with row 4 i get the error "Number of indices exceeds the number of dimensions of the indexed array".Secondly if i continue, but ignoring the above,the when the function returns it does not seem to get to row 2, but does not error.Any help would be much appreciate
VIEWS ON THIS POST

212

Posted on:

Wednesday 2nd January 2013
View Replies!

VS.NET keeps reformatting my html! This is driving me nutts!

Good Morning,So I this snipit of code from one of my pages:CODEMy Name Here which does exactly what i want it to do in any text editor.\tand when i first load it up in VS.NET it looks fine.\tHowever, if i make any changes i'll get this error alert (from VS.NET) when i try to compile:Could not format the document due to line 86.\tThe original format has been restored.I click OK on that error message (my only option) and when the page loads it's all messed up.\tWhen I go back to my code, the orginal snippit looks like this:CODERichard W. Pricein addition to this block of code being screwed up, any blocks where i use the style attribute to set the background image gets messed up.any idea what's going on here
VIEWS ON THIS POST

186

Posted on:

Wednesday 2nd January 2013
View Replies!

Slide Menu User Control

I'm working with this free slide menu control I downloaded from www.asp.net. The problem I'm having is I've put this menu into a user control of my own, when I click to go to another page, the category I select from slides back up.When I expand the admin section of the menu like this:For Example:Administration--------------Add UserAdd ProductDisplay Data--------------Retrieve Data--------------and click on 'Add User' then when I get to the Add User page it goes back to this:Administration--------------Display Data--------------Retrieve Data--------------instead of keeping the menu like this:Administration--------------Add UserAdd ProductDisplay Data--------------Retrieve Data-------------
VIEWS ON THIS POST

92

Posted on:

Wednesday 2nd January 2013
View Replies!

Run button click event after enter is pressed

I have a webform containing a textbox control and a button control.\tThe user populates the textbox and then clicks the button, which subsequently runs a click_event.\tHow could I setup the textbox so that the user can simply press the keyboard "Enter" button to fire the button's click_event instead of having to click the button --Mike
VIEWS ON THIS POST

456

Posted on:

Wednesday 2nd January 2013
View Replies!

How to get more toolbar back in crystal report?

I try to design a crystal report in vb.net and found that there missing some toolbar. How to get them back into vb.net
VIEWS ON THIS POST

190

Posted on:

Wednesday 2nd January 2013
View Replies!

Do you know the tool to create image for image button?

I knew that most graphic software can do it. What I am looking for is a tool can create image for button, I can design what type, style, color and can type text on it easier. Anyone can recommend it
VIEWS ON THIS POST

178

Posted on:

Wednesday 2nd January 2013
View Replies!

Newbee SQLConnection problem

Here is the function that creates the connection.\t\tPrivate Shared Function Connection() As SqlConnection\t\t\t\tDim conHalloween As New SqlConnection()\t\t\t\tDim strConnectionString As String\t\t\t\tstrConnectionString = "User Id=sa;" _\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"Server=charlies;" _\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"Database=Northwind"\t\t\t\tconHalloween.ConnectionString = strConnectionString\t\t\t\tReturn conHalloween\t\tEnd FunctionThis is the result I get when the page comes up after it is suppose to create a dataset from the database.Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. The server is not the MSDE that comes with Visual Studio.NET but the Developer edition of SQL Server 2000.Any help would be greatly appeciated
VIEWS ON THIS POST

126

Posted on:

Wednesday 2nd January 2013
View Replies!

LAUNCH the local Email (say Outlook) rather than SEND email automatic?

I can send Email directly or automatically without a problem in ASP.Net. But I want to launch the local email client (say Outlook or whatever email client) instead with a file attachment for the user to SEND the email MANUALLY .. how do I do that\t\t\t\t\t\t\tDim myMail As New MailMessage()\t\t\t\tmyMail.From = "me@who.com"\t\t\t\tmyMail.To = "mymy@yoyo.com" \t\t\t\tmyMail.Subject = "Test Message"\t\t\t\tmyMail.Priority = MailPriority.Low\t\t\t\tmyMail.BodyFormat = MailFormat.Html\t\t\t\tmyMail.Body = "Test" \t\t\t\tSmtpMail.SmtpServer = "localhost"\t\t\t\t\t\t\t\tSmtpMail.Send(myMail)Instead of SmtpMail.Send ..... is there something else ... or is that a totally different approach
VIEWS ON THIS POST

130

Posted on:

Wednesday 2nd January 2013
View Replies!

Clear all texbox in a form

hi, I have over 10 input forms, for every data entry in each of those form I need to clear the textbox. at this point I am creating this in every single form to clear the textbox.textboxname.text = ""I know this is not the best approach. I have been reading about OOP and would like to know if this is possible.since a form has an id, so it is unique so can I create a function\tthat accept a form name then I can iterate on all the textbox in the form and clear them.sub cleartextbox (myfrm as form_object)for each textbox in the myfrmtextbox.text = ""nextI know the code is wrong. but this is the notion that I would like to apply. If this is possible, can anyone show me the right code to apply what I have explained
VIEWS ON THIS POST

163

Posted on:

Wednesday 2nd January 2013
View Replies!

Generate Aspx Template File?

,I am making a web App that allows the Owner of the app to customize what they want User to see. For Example, One set of user may want: (the underlines represent a textbox)First Name: ___________Middle Name: __________Last Name:__________and another :First Name:____________Last Name:_____________I have a model in Which I am storing the whether the Control is visible and what the label text should be stored in a SQL database.\tCurrently I have the Codebehind page load the controls dynamically, then I assign any data to the controls.What I am wondering is if I can instead of Building the page dynamically adding the controls at run time if I can build it one time with an admin program and then have the page only rebuild (Place controls) if the admin program has a change.I am thinking that instead of haveing a code behind that runs on the server at run time I would like a Windows app that does the same thing and then places Server script and
VIEWS ON THIS POST

169

Posted on:

Wednesday 2nd January 2013
View Replies!

Highlight an item in a repeater control

I am displaying the results of a database query in a repeater control.\tI am using alternating item templates so that the background color alternates with each row from the query.\tThat is working nicely.I would like to "Highlight" one row in the list.\tThis row would be the one whose data item (Building_ID) matches the parameter that was sent to the page when it was loaded.I tried this code to make the matching item Yellow instead of Blue...\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI get an error saying that Container is not declared, yet it seems to know what Container.DataItem("building_id") is when it displays the data.\t(if I take out the IF statement that is trying to set the background color).I might understand this better if I knew what the # is for before the Container.DataItem objects.Any suggestions
VIEWS ON THIS POST

175

Posted on:

Wednesday 2nd January 2013
View Replies!

Displaying *.jpeg pictures in a datagrid control

Im displaying a datagrid on a web form. The grid is bound to a query in an Access 2000 database. One of the fields in that query is a relative path to *.jpeg pictures. Is there a way of displaying the picture in each row for that datagrid I was thinking of an ItemTemplate in which I would put an Image control but couldnt see how. Detailed explanations would be greatly appreciated.Ciao,Assaf
VIEWS ON THIS POST

132

Posted on:

Wednesday 2nd January 2013
View Replies!