Help with using "For...Next"


I want to create a set of HyperLinks which call a function, i.e.

A

But I want to do this for the entire alphabet. Is there some way I can iterate through the letters using a "For...Next" statement to generate these links
Posted On: Wednesday 2nd of January 2013 02:28:49 AM Total Views:  306
View Complete with Replies

RELATED TOPICS OF ASP.NET PROGRAMMING LANGUAGE




Customizing a Catalog Zone

I've got a webpage that displays webpartzones.\tIn the DB (not the aspnetdb) I have all my webpartzones assigned to users and only users can see certain ones, according to my db.\tThe problem comes when any user closes a webpartzone then wants it back, the Catalog Zone displays ALL available zones in it's catalog.\tI do not want this.\tI would like to base the list in the catalog zone on what they are assigned in the DB.Is there a way of customizing the Catalog Zone upon creation to loop through the webpartzones available and then decide whether or not to show them in the Catalog Zone
VIEWS ON THIS POST

188

Posted on:

Wednesday 2nd January 2013
View Replies!

Master / detail - updating master ID from detail page?

Hi .I have been trying to find the answer to a simple question, but from what i have found so far, it seems very complicated.I have a small SQL database with a couple of web pages - master and detail. I can insert, update, delete entries on both pages with no problems - as long as i remember the "masterID" from the master page, when adding new records to the details page.There lies my simple question - there must be a way of getting the details page to remember the masterID when i insert a new related recordSomeone has told me to use a session state - which is fine if you know what one is, but can someone now tell me how to use it I can't believe that something so simple is so hard to do.
VIEWS ON THIS POST

164

Posted on:

Wednesday 2nd January 2013
View Replies!

Problem with adding a reference

.I created a WebService, and a proxy class.Now\tfor a windows application I had to add System.Web as a reference in order to consume the service.It worked, after several tries.Then I tried the same for a PocketPC type of application.I got the following error, eventhough System.Web.Services\twas originally added to the reference.The type 'System.Web.Services.Protocols.SoapHttpClientProtocol' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.\tI compared the solution with the windows application one. I noticed that System.Web.Services in Win App was loaded from the following location C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Services.dll.So I had to make the subsequent changes on that and on System.dll as well.But now, the\tPocketPC application won't work.Furthermore switching back the references to the original location: C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE, didn't fix the problem.Still getting this error: Deployment and/or registration failed with error: 0x8973190e. Error writing file '\Windows\NETCFV2.ppc.armv4.cab'. Error 0x80070070: There is not enough space on the disk.Any ideasThank you.
VIEWS ON THIS POST

170

Posted on:

Wednesday 2nd January 2013
View Replies!

ItemCreated event on Datagrid PageIndexChanged

My basic goal is to highlight a row if there's a certain data condition.\tThis is fine, until the user tries to page to the next page, and I get the:"Object not set to an instance of an object"I went through the code, and if I comment out my ItemCreated even of the datagrid, I can page successfully.Do I need to call something in my PageIndexChanged event so the ItemCreated event gets called as wellHere's the pageindexchanged event:DG.CurrentPageIndex = e.NewPageIndex\t\t\t\tIf txtWBSNumber.Text String.Empty Then\t\t\t\t\t\tCall BuildDGFiltered()\t\t\t\tElse\t\t\t\t\t\tCall BuildDG()\t\t\t\tEnd I
VIEWS ON THIS POST

200

Posted on:

Wednesday 2nd January 2013
View Replies!

Add object Flash!!!

Hi...How can I add to my web form an Animation Flash (*.swf)\tI try to add the reference Shockwave Flash but so I want to use it, this control is disable, why reasonWhere is the problem
VIEWS ON THIS POST

174

Posted on:

Wednesday 2nd January 2013
View Replies!

System.String.Format("{0:C}" question

HiI currently use this line ...CartTotal.Text = "Total: " & System.String.Format("{0:C}", TotalNumber).ToStringto display the total sum of a shoppingcart, but it allways round up/down to nearest number. How can I change this so it display like this... 123,4
VIEWS ON THIS POST

151

Posted on:

Wednesday 2nd January 2013
View Replies!

CSS Control Adapters

Has any one ever used CSS Control Adapters How do you install it in to VS 2005.netBabloome
VIEWS ON THIS POST

210

Posted on:

Wednesday 2nd January 2013
View Replies!

Server Timeout Accessing a Formview

I've built a custom web-based CRM in ASP.NET 2.0 on Sql Server 2000.\tCurrently updating a contact is very inconsistent. If I go into a contact through http://MyServer/secure/allcontacts.aspx or http://MyServer/secure/allcontacts.aspxcontactid=6151 then the updatecontact() sub that I have defined runs fine. UpdateContact() consists of a sql server transaction with a try/catch block and parameters for each field on the page. If I go through http://MyServer/secure/allcontacts.aspxcontactid=6151&Dup=true then I get "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding,"on the catch section but no error message is rendered to the user - they see nothing at all. This seems to be happening when the application tries to access a formview control (which may or may not be visible at the time). I've tried Data.SqlClient.SqlConnection.ClearPools(), myCommand.CommandTimeout = 3000, and in the web.config but none of these seems to be working. The formview has a sql datasource and it gets as far as running the sqldatasource_selecting event and then gets stuck. Can anyone help me figure out why this is happening and how I can fix it
VIEWS ON THIS POST

158

Posted on:

Wednesday 2nd January 2013
View Replies!

Dataview returns 0 records, but it's source dataset is ok

I have a dataset (dsEmp1), a dataview (dvEmpActive), a datagrid(LeadGrid) and a dropdownlist(ddlRep) as a template in the grid. The source table of the dataview is dsemp1.employee. Right now the rowfilter is empty, and the sort is on EmpLastFirst.When I use the dataset as the datasource for the dropdownlist, it populates nicely. However, if I change the datasource to the dataview (leaving the other propertiess the same), I get no records (even if I remove the rowfilter).\tI'm doing this because I want to filter and sort the returned records for the dropdownlist.\tI must be really tired... I use similar logic on another page, and it works ok
VIEWS ON THIS POST

173

Posted on:

Wednesday 2nd January 2013
View Replies!

Validating for Radio Buttons

How would I validate for a radio button in .net
VIEWS ON THIS POST

146

Posted on:

Wednesday 2nd January 2013
View Replies!

Repeater Help

I have a repeater that displays an alphabetized list.When the first letter changes, I want to add something like [LETTER] thus:AawordanotherwordanothernotherwordBbentbendover...I was thinking of some type of OnItemCreated event handler:CODE\t\tprotected void Repeater1_ItemCreated(object source, RepeaterItemEventArgs e)\t\t{\t\t\t\tfirstLetter = e.Item.DataItem.ToString().Substring(0, 1);\t\t\t\t//Response.Write("Letter: " + firstLetter + "");\t\t\t\t\t\t}But I can't quite get this working.I was looking at http://www.codeproject.com/aspnet/ObjectRepeater.asp - but that's too complex of a solution for this.Suggestions
VIEWS ON THIS POST

198

Posted on:

Wednesday 2nd January 2013
View Replies!

Datagrid Editcommand dropdownlist problem

I'm getting the following error:Type is neither a DataColumn nor a DataRelation for table TableMy table, "Activity_Types", has a PK field of "Type" which is an navarchar(100).\tIt'll be a small table...no more than 10 records.\tThat's the only field other than a smalldatetime field to show when the record was created.My HTML is:\t\tThe code behind is:Function GetTypes() As DataSet\t\t\t\tDim sCon1 As New SqlConnection\t\t\t\tsCon1.ConnectionString = Session("DBDDL")\t\t\t\tsCon1.Open()\t\t\t\tDim strSQLType As String = "usp_ActTypes"\t\t\t\tDim cmd As New SqlCommand(strSQLType, sCon1)\t\t\t\tcmd.CommandType = CommandType.StoredProcedure\t\t\t\t'Create the DataAdapter\t\t\t\tDim DA As New SqlDataAdapter\t\t\t\tDA.SelectCommand = cmd\t\t\t\t'Populate the DataSet and the connection\t\t\t\tDA.Fill(ddlDataSet, "Activity_Types")\t\t\t\tsCon1.Close()\t\t\t\t\t\t\t\tReturn ddlDataSet\t\tEnd Function\t\tFunction GetSelectedIndex(ByVal ActVal As String) As String\t\t\t\t'Loop through the dataset ddlDataSet\t\t\t\tDim iLoop As Integer\t\t\t\tDim dt As DataTable = ddlDataSet.Tables("Activity_Types")\t\t\t\tFor iLoop = 0 To dt.Rows.Count - 1\t\t\t\t\t\tIf ActVal = dt.Rows(iLoop)("Type").ToString() Then\t\t\t\t\t\t\t\tReturn iLoop\t\t\t\t\t\tEnd If\t\t\t\tNext iLoop\t\tEnd FunctionPrivate Sub DGActivities_EditCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DGActivities.EditCommand\t\t\t\tDGActivities.Columns(1).Visible = False\t\t\t\tDGActivities.EditItemIndex = e.Item.ItemIndex\t\t\t\t'First build the ddl for Type\t\t\t\tCall BuildDGActivities()\t\tEnd Sub
VIEWS ON THIS POST

169

Posted on:

Wednesday 2nd January 2013
View Replies!

pass page to a class and loop through the controls

C#My goal is to validate the text entered in to textboxes to make sure there aren't any illegal characters before it gets written to the database.\tMy thought is to pass a page (and all it's controls) to a class, loop through the controls on that page to identify all the textboxes,validate the text within those textboxes, and then return a boolean to the page.Is what I'm thinking even possible\tIs there a better way to handle
VIEWS ON THIS POST

148

Posted on:

Wednesday 2nd January 2013
View Replies!

CDOSYS

When using CDOSYS to send mail why do you have to configure\tyour mail object to point to the remote SMTPserverIf my ASP script is running on the same server as SMTP why do I have to configure itcheers
VIEWS ON THIS POST

126

Posted on:

Wednesday 2nd January 2013
View Replies!

Dropdown value and StringBuilder

Does anyone know how I would do this'** When a user selects an option from the dropdown box an onChange event modifies the value of the hidden input box below. sb.Append("")'** I need to change "description" below to be what the user has chosen i.e. The value from the hidden input box descriptionName_ + vid ** instead of ds.Tables(0).Rows(i).Item("description").ToString()This didn't work. document.forms[0].elements['descriptionName_" + vid + "'].valuesb.Append("")
VIEWS ON THIS POST

217

Posted on:

Wednesday 2nd January 2013
View Replies!

Setting the focus to a textbox in a datagrid

I would like to set the focus to a textbox within a datagrid after I click a button.\tI usually use this sub...CODE\tPrivate Sub SetFocus(ByVal ctrl As System.Web.UI.Control)\t\t\t\tDim s As String = "document.getElementById('" & ctrl.ID & "').focus() "\t\t\t\tRegisterStartupScript("focus", s)\t\tEnd Subbut I can't get it to work for an item in the datagridCODEDoes anyone know how I can get this to workoh, yeah here is how I was trying to call it..CODEMe.SetFocus(Me.dgTreatment.FindControl("txtAddClinic"))
VIEWS ON THIS POST

171

Posted on:

Wednesday 2nd January 2013
View Replies!

Container.DataItem error

I am getting the following error The type or namespace name 'Container' could not be found (are you missing a using directive or an assembly reference)I have a repeater like thissp:repeater id="Repeater1" runat="server">\t\t\t\t\t\t\t\tI also include this in .aspx page what is missing
VIEWS ON THIS POST

182

Posted on:

Wednesday 2nd January 2013
View Replies!

upload file without original

I am being passed a file path\name from an ASP site.\tIs it possible to upload the file like this
VIEWS ON THIS POST

189

Posted on:

Wednesday 2nd January 2013
View Replies!

web.config, is it safe to store conection string

Is it safe to store connection string and application setting variable in the web.config file How secure it is
VIEWS ON THIS POST

478

Posted on:

Wednesday 2nd January 2013
View Replies!

Inserting Data to SQL

Hi ,I am getting a data from the user from a textbox and I want to add it to the SQL server but I don't want to use a stored procedure instead codes are on the *.aspx page.My code is:INSERT INTO Authors (Id, LName) values(UserName,@txtUserPass\t)and error message is:System.Data.SqlClient.SqlException: Must declare the variable '@txtUserName'when I use this code with adding a string like below there is no problem INSERT INTO Authors (Id, LName) values('User','pass' )but I want to use variables.Is there anyway to do this directly without using stored procedures
VIEWS ON THIS POST

171

Posted on:

Wednesday 2nd January 2013
View Replies!

Oracle connectivity with ASP.Net

Hi ,I want to connect ASP.Net with Oracle 8...i have installed Microsoft .Net Oracle Cleint..i got this code from the Net===========================================================Imports System.Data.OracleClientDim oOracleConn As OracleConnection = New OracleConnection()oOracleConn.ConnectionString = "Data Source=Oracle8i;" & _\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"Integrated Security=SSPI";oOracleConn.Open()===========================================================without using DSN, wht will be my connection string..
VIEWS ON THIS POST

110

Posted on:

Wednesday 2nd January 2013
View Replies!

get month in the Calendar1_SelectionChanged Event handler

...here is the scenario i am facing:I have a page with a calendar control that shows all the events of the current month (i.e. it if you open he page now it will show anuary Events). my problem lied in that when i move to either the previous or next months it didnt\tload the events of these months. i fixed this problem by creating the event Calendar1_VisibleMonthChanged and i was able to lod the events of each month as i scroll through them.now when i click on any day of the month it calls the Calendar1_SelectionChanged eventhandler and it in turn checks to see whether there is an event on that day or not y checking ti against the database. i there is it redirects to apge with all the details of that event, if not, it gives a message that there are no events on that day.my problem is that when i move to another month (say December) and i click on a day where there is an event it tells me there r no events. this hapens because the Calendar1_SelectionChanged event handler calls all events of the current month (January) and when my selection of the December event is checked against them it doesnt find any event.i want to get the month number whil i am in the Calendar1_SelectionChanged eventhandler. how can i do thisThank you,The HMS
VIEWS ON THIS POST

175

Posted on:

Wednesday 2nd January 2013
View Replies!

Validation of dropdownlist and checkbox

I am trying to use the following script to see determine whether a dropdownlist has a value in it or to see whether a checkbox has been checked.\tI don't want the user to be able to do both. In other words I don't want a user to check a checkbox and choose an item from a drop-down list box.\tI want them to do one action or the other.Here is my script to try and do this but im not sure if my logic is correct as I get an error no matter what I do. Can someone please help me.function ValidateDropDownOrCheckBox(sender, args){if ( document.WebForm2.DropDownList1.value ||&& document.WebForm2.CheckBox1.checked )\t\t{\t\t\t\targs.IsValid = true;\t\t\t\t\t\t\treturn;\t\t\t}\t\t\telse\t\t\t\t\targs.IsValid = false;}This is how I refer to this script
VIEWS ON THIS POST

199

Posted on:

Wednesday 2nd January 2013
View Replies!

How to use Include file in ASP.NET

I use the following line of code in a ASP page: then I just call the function storedin the include file when needed.How do I do the same thing in ASP.NET coding I use behind coding.Steve
VIEWS ON THIS POST

153

Posted on:

Wednesday 2nd January 2013
View Replies!

cannot configure data adapter

You need to add the SqlParameter to the command's Parameters collection, like:CODE.Parameters.Add(new SqlParameter("@table_name", "audit_accepts"))HTH
VIEWS ON THIS POST

203

Posted on:

Wednesday 2nd January 2013
View Replies!

Custom checkbox control

I have already posted a thread regarding my failed efforts to use a CheckBox within a Repeater control.\tSpecifically that I was unable to pick up the Checked event.However, there is another behaviour I require from my checkbox, that being a third display option.\tThe checkboxes are being used to select items within a custom tree-view.\tI would like the checkbox to be checked with a grey background then some, but not all, items below it in the tree are selected.\tOne idea I had for this, which would also get me around my initial problem with catching the event, is to use an ImageButton instead.\tTo make this work I would need the three images that correspond to the three states of checkbox I wish to display.Firstly, does this seem like a reasonable thing to do, or could there be some sort of issue that I am not considering\tPerhaps a better way of achieving what I am trying to achieveSecondly, ccould anybody tell me where I could find the images I require
VIEWS ON THIS POST

247

Posted on:

Wednesday 2nd January 2013
View Replies!

Loading ASP.NET application to DiscountASP.net

I'm going to be transfering my asp.net application to the ISP DiscountASP.net. Is it possible to just copy over all the files instead of using Visual Studio to do it They give you an option to use VS but you must have Front Page extensions enabled first.I'd rather just copy them over than using VS.Has anyone have experience with this
VIEWS ON THIS POST

89

Posted on:

Wednesday 2nd January 2013
View Replies!

Check for Session variable existance

I'd like to create an if statement to check for a session variables existance. Can someone helpI tried this but it didn't work for me:if(Session["Type] != null){
VIEWS ON THIS POST

145

Posted on:

Wednesday 2nd January 2013
View Replies!

changing the position of a panel box with code.

I was wondering if this is possible (seems like it should be.) I have a panel box on my page that i could like to move when the user clicks a button.\tsomething to the effect of panel1.top = 100pxpanel1.left = 8pxis there a way to do this in codecheers.
VIEWS ON THIS POST

151

Posted on:

Wednesday 2nd January 2013
View Replies!

Access to path "myPath" denied

Hi ,I'm creating a site that allows users to download report files. The files are created at run time based on user selections. I created a folder within the root of my site called "\TempRprts" and what I'm trying to do is (1) save the report file (created based on user criteria) to the "\TempRprts" folder, (2) upload the file to the user's computer using Response.WriteFile, and (3) once the user has download the file to his machine, delete it from the "\TempRprts" folder. I have the following code:CODEstring fileName = "MyFile.pdf";string fileSave = this.MapPath("TempRprts\\" + \tfileName);string contentString = "attachment; " +\t"fileName=\"" + fileName + "\"";Response.Clear();Response.ContentType = "application/pdf";Response.AddHeader("content-disposition", contentString);Response.WriteFile(fileSave);Response.End();The bold red line above produces the error: Access to the path "c:\inetpub\wwwroot\MySite" is denied. I went ahead and assigned Write permissions to the root folder of my site and also to the c:\inetpub\wwwroot\ folder and I still get the same error. Can anybody tell me what the problem is By the way, if I change the folder I'm trying to save the temporary file to from this.MapPath("TempRprts\\" + fileName) to "C:\\" + fileName, everything works fine. But of course, I wouldn't want to use the C drive of my server to write temporary files, or would ICan anybody please point me in the right path
VIEWS ON THIS POST

97

Posted on:

Wednesday 2nd January 2013
View Replies!

Change HTML Code

dearI have a page (aspx) with a lot of controls.Is it possible to change the html code at run timeHow can I find an specific part of html code and change/remove/addThank you very much
VIEWS ON THIS POST

103

Posted on:

Wednesday 2nd January 2013
View Replies!

how to add controls programatically

I want to add controls at runtime (depending on data retreieved from a database) like checkboxes, buttons or textfields... how do I add them to the document programatically (i use c# as programming language for asp, and VS .NET as IDE)
VIEWS ON THIS POST

128

Posted on:

Wednesday 2nd January 2013
View Replies!

View Errors on Client Machine

I have a project that works on my local box and intranet.\tI am now trying to post the project to our webserver.\tI am getting errors when I attempt to view the pages on our website, but the only thing I get is a message telling me to enable a custom error pageServer Error in '/GalleryCatalog' Application.--------------------------------------------------------------------------------Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".\t\t\t\t\t\t\t\tNotes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.\t\t\t\t\t\t\t\tHow can I access these errors, to debug the problem Jason MeckleyDatabase AnalystWITF
VIEWS ON THIS POST

99

Posted on:

Wednesday 2nd January 2013
View Replies!

Asp.net DLL question.

In ASP.net, the code logic(code-behind) is compiled into a DLL file. Would it be possible for someone to download the DLL file(Code-behind) and snoop around, looking for member variables and class methods Would it be safe to store lets say a username and password Since its a DLL file, can someone use my DLL file in their own application to call a method or access a variable
VIEWS ON THIS POST

148

Posted on:

Wednesday 2nd January 2013
View Replies!

Can you use a dash - in Naming Conventions

I have named an asp report DP-Reports, I have actullay renamed a project and I am having problems I was wondering is it OK to name objects with DP-Reports Cheers,Rachel
VIEWS ON THIS POST

85

Posted on:

Wednesday 2nd January 2013
View Replies!

dialog box

how can i make a dialog box appear (i'm writing in c#) for an example of what i mean visit [link]http://www.familiepfeifer.de/Contact.aspxLang=en and click send without filling anything in. ____________________________________________________If you like a post, show you care by giving it a .
VIEWS ON THIS POST

84

Posted on:

Wednesday 2nd January 2013
View Replies!

Browser Menu Bar

I would like to get rid of the menu bar on my popup page.I have a hyperlink control that links to a page, and I would like that link to popup a new window without a menubar.I know you can open new windows using javascript:window.open(link, null, "menubar=no", null)But I don't know how to make my link do something like this.
VIEWS ON THIS POST

87

Posted on:

Wednesday 2nd January 2013
View Replies!

asp:hyperlink navigateurl problem - link not showing up

I have a link on one of my pages that goes back to the previous page.\tThe link is not in a DataGrid - just in an HTML table.\tMy code is this:BackstrURL is defined in my codebehind page as "javascript:goBack("When I run the page, the only thing that shows up is the word Back.\tNo link or anything.I really need to set up my URL like this as I have to pass the OrderID via a form variable (my goBack function submits the form)In other pages I've written, I set up links just like this and it's worked fine.\tThe only difference is that those links were in a datagrid, and this link is not.Any suggestions would be appreciated
VIEWS ON THIS POST

77

Posted on:

Wednesday 2nd January 2013
View Replies!

selecting a row from a datalist

I'm trying to figure out how to find the appropriate row in my dataset without having to do a select that will return one row and then selecting that one row.\tIn vb.net, I'd use the FindByMenuItemID method, but that doesn't seem to be working in c#.\tAnyone know what I'm doing wrong\tHere's the code:...private void m_dlMenuItem_ItemCommand(object source, System.Web.UI.WebControls.DataListCommandEventArgs e) {\tswitch (e.CommandName)\t{\t\t\tcase ("deleteMenuItem"):\t\t\t// handles the user selecting delete\t\t\t// and ok'ing the confirm dialog\t\t\tDataList dl = (DataList)source;\t\t\tint iItemID = (int)((DataList)source).DataKeys[e.Item.ItemIndex];\t\t\tDataRow[] oDataRow;\t\t\tMenuItemDataset.MenuItemRow oItemRow;\t\t\toDataRow = m_dsMenuItem.MenuItem.Select("MenuItemID = " + iItemID);\t\t\toItemRow = (MenuItemDataset.MenuItemRow)oDataRow[0];..
VIEWS ON THIS POST

59

Posted on:

Wednesday 2nd January 2013
View Replies!

Refresh button and multi-framed pages

I've got 3 frames which when loaded in correct order i.e. top down to 3rd frame work just fine. The lower frames call methods in parent frames - so the parent frames have to be there for this. However when I click the browser refresh - the frames seem to load ad-hoc or maybe from lowest (focussed) frame up - causing crash as this is trying to run methods in parent frame thats not yet loaded!!!!Anyone know how to:1) disable the browser refresh button programatically2) OR catch this as an event somewhere3) OR test the loading state of a frame i.e. is it empty, loading or loadedI can probably fix above by replacing frames with iframes - but only want to do this if no other solution..
VIEWS ON THIS POST

79

Posted on:

Wednesday 2nd January 2013
View Replies!

Can i use Include files for my connection in .net/ alternatives??

Hi all,In classical asp i could keep my connection details and objects in a seperate Include file and could keep it in the top of each asp file so i didn't need to open connection all over again. My questions are:can i use Include files to keep my databse connections in asp.net and Any better other alternativesregards,rahman
VIEWS ON THIS POST

76

Posted on:

Wednesday 2nd January 2013
View Replies!

Overcoming large image map problem in IE

Hi all,On one of our web applications, an image is created dynamically.\tOn this image the user can hover the mouse over some parts of the picture to get certain information, and can then click on these same annotations to edit them.\tIn order to do this, I create an image map along with the image.\tThe image map has onMouseOver and onClick properties for the image.The problem is that the image map for this picture can get quite large, and when it gets too large it drives internet explorer nuts.\tIn one example, the image map alone is 1.5 MB of information, and when internet explorer tries to open it the browser will not show the image, the buttons go haywire (i.e.\tradio buttons are replaced by j's), and after closing the browser, windows will act weird\t(such as right-click menus coming up all black) until I restart the computer.\tI have tried to run the app on a few different computers, all with the same symptoms.\tI can run it in Netscape 7.0, but cannot get it to run in IE.\tDoes anyone know why IE does this\t\t Kevin B..Net Programmer\t
VIEWS ON THIS POST

374

Posted on:

Wednesday 2nd January 2013
View Replies!

Hi, just a quick question. I'm tryi

just a quick question. I'm trying to create thumbnails from full images. The code is working fine except when it comes to actually naming the thumbnail. The relevant parts of the code are as follows 'Get relevant details from previous form called "MyFile"FileName.InnerHtml = MyFile.PostedFile.FileNameDim strFileName as string = MyFile.PostedFile.FileNameFileContent.InnerHtml = MyFile.PostedFile.ContentType FileSize.InnerHtml = MyFile.PostedFile.ContentLength'Get the main imageDim currentImage as System.Drawing.Image = System.Drawing.Image.FromFile(FileName.InnerHtml) Dim thumbImage as System.Drawing.Image'set the width and height of the new thumbnailDim Width as integer = 100Dim Height as integer = 100Dim myOutput As FileStream'create thumbnailthumbImage = currentImage.GetThumbnailImage(Width, Height, nothing, nothing)myOutput = new FileStream(MapPath(strFileName), FileMode.Create, FileAccess.Write, FileShare.Write)'save thumbnailthumbImage.Save(myOutput, ImageFormat.Gif)myOutput.Close()My problem is that i want to save the files in the following format - if the main image is called example.gif, i want to save the thumbnail as example_thb.gif. However its the "MapPath(strFileName)" line of code that is the problem. It won't allow me to create a file name string similar to the following MapPath(strFileName"_thb".gif), I'm only a beginner asp.net programmer so any help would be grreatly appreciated
VIEWS ON THIS POST

64

Posted on:

Wednesday 2nd January 2013
View Replies!

OnMouseOver / OnMouseOut event for custom control

Hi , I've got a composite custom contyrol I built that displays data in a normal tag. I'm trying to pause the scrolling of the tag's text by using the 's Start() and Stop() methods, like so: ....some generic content... However, when I try and plug this into my custom control, I get a JavaScript error that says "Object doesn't support this property or method." Is this an example of a need for me to attach and/or handle an event, even though OnMouseOver nd OnMouseOut are inherent (or so I thought)
VIEWS ON THIS POST

182

Posted on:

Wednesday 2nd January 2013
View Replies!

ReUsing variables

for example I have thisdim myTableCell as TableCell'use table cellbuncha code'use table cell buncha code'use table cellIs it better to do a myTableCell = New TableCell() each time or to use a completely different variable.\tMy question came from the fact that when I am done with table cell I like to do a myTableCell = Nothing.\tEven without it I believe that when you do = New TableCell() it causes late binding, which is slower than early binding rightSo is it better to think up new names for each instance of a class type or is it ok to reuse the same variable by reinstanciating.Discuss That'l do donkey, that'l do MarkIf you are unsure of forum etiquette check here FAQ796-2540
VIEWS ON THIS POST

70

Posted on:

Wednesday 2nd January 2013
View Replies!

nesting repeater or datalist controls

Is it possible to nest a repeater or datalist control inside another of the same I get 'Object reference not set to an instance of an object' when I try this.
VIEWS ON THIS POST

68

Posted on:

Wednesday 2nd January 2013
View Replies!

Highlighting the Contents of a textbox control

Does anyone know how to Highlight the entire contents of a textbox control
VIEWS ON THIS POST

130

Posted on:

Wednesday 2nd January 2013
View Replies!

web user control in form

I have a web form which contains a web user control. This control is a login box that accepts username and password and has a submit button to validate input. The web form also has textboxes for user input (eg. Profile details), and it's own submit button. It's textboxes text are validated using requiredfieldvalidation controls. If the user is on this web form and tries to log in using the user control, the other forms requiredfieldvalidation controls are activated. How do I get around this, ie. focus on the 1 submit button and not check for validation before redirecting to another page is username and password are valid The issue here I think is that I can have only one form tag using runat=server on the web form.Hope this makes sense for someone to help,
VIEWS ON THIS POST

89

Posted on:

Wednesday 2nd January 2013
View Replies!

Forms Authentication does not log me out.

I have set the Timeout in my Web.config, but after that amount of time I am still logged in. What else do I need to know about logging out after a certain time period
VIEWS ON THIS POST

157

Posted on:

Wednesday 2nd January 2013
View Replies!

Show image from Access DB with ASP.NET

Hi!Lets say I want to display a list of movies from an Access DB. On each movie title I want a link to a Note! I want only to have only ONE imagebox which changes to which movie title I press. I want the image to be in realtime, not a new popup window. I have made it with a popup window, but I cant figure out how to show the image real time with asp.net. Look at this sample link. The movie titles doesnt have any link in this one, but its the way Im thinking.. only this is with classic ASP.http://www16.brinkster.com/tommyfossli/divx/template.aspDoes anyone have any code regarding getting pics from an Access DB and showing the pic regarding which pic/label you are pressing
VIEWS ON THIS POST

229

Posted on:

Wednesday 2nd January 2013
View Replies!