Datalist problem with setting values to buttons




I have a datalist with a template which among other things adds a button to
each item from the SQL Database. I need to set the value of the id field of the record in
the db to the button like this:



The problem is I get this error:

' is not a valid identifier

How should I bind the id number to the id\t
Posted On: Wednesday 2nd of January 2013 02:29:25 AM Total Views:  287
View Complete with Replies

RELATED TOPICS OF ASP.NET PROGRAMMING LANGUAGE




Some data retrieval advice needed!!

Hi all,i am creating a page that depending on the viewType shows information about a particular venue, for instance, the query string:http://mypage/venue.aspxviewType=Facilitieswould only show the facilities section.\tNow, i need some help deciding the best way to tackle this, do i:A) pull all the data from the database and then pull what i need from the database, might be a bit trickier to code.B) pull the data from the database on demand, using a case statement to tell the page what to get from the database and what to display on the page\tCan someone please give me some advice
VIEWS ON THIS POST

120

Posted on:

Tuesday 27th November 2012
View Replies!

ASP.NET Directory Architecture

I have a fairly easy question that more likely than not has numerous subjective answers, but I need some help nonetheless.I have programmed in .NET for a while mostly winform applications, but I have never owned a very large scale web project before. Well, that time has arrived and now that I am through gathering requirements I was horrified to realize that I couldnt plan out directory architecture well.In the classic ASP days I could easily visualize the cleanest structure for includes providing for clean code re-use and separation of file types (img,js,xml,swf folders etc). As the site drilled down the sub directory structure for various site components provided for ease of management too. So my question is how do most of you design your directories to provide in growth in complexity in your code line for an ASP.NET site There will be eventually 14 very separate and complex areas (used for financial and OLAP reporting), but a single header file in the ASP days would work fine here (page titles and meta data needs to be fetched from a table). Any opinions would be great!\t
VIEWS ON THIS POST

122

Posted on:

Wednesday 2nd January 2013
View Replies!

Show property value in a repeater

I have the following strucure:\t\tpublic struct AvailableSkillDetails\t\t{\t\t\t\tpublic int ID;\t\t\t\tpublic int CDT_ID;\t\t\t\tpublic int SKI_ID;\t\t\t\tpublic bool DIPLOMA;\t\t\t\tpublic DateTime DIPLOMA_DATE;\t\t\t\tpublic string DESCRIPTION;\t\t}I put several of these objects in a sortedlist. Now I want to databind the sortedlist to the repeater. How would i display the value of the property "description" for each entry in the repeater
VIEWS ON THIS POST

78

Posted on:

Wednesday 2nd January 2013
View Replies!

SQL Parameter problem

I'm trying to insert some new rows in a SQL database thru ASP.NET.\tI keep getting: "The name 'Code' is not permitted in this context.\tOnly constants, expressions, or variables allowed here.\tColumn names are not permitted".\tThe column name I'm trying to enter data to is called: Code.\tIt is of type int.Here's an example:CODEtry\t\t\t\t\t\t{\t\t\t\t\t\t\t\tconnSQLServer = new SqlConnection(strConnSQL);\t\t\t\t\t\t\t\tconnSQLServer.Open();\t\t\t\t\t\t\t\tint Code = 7;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstring strSQL = "INSERT INTO ICRSupervisor (Code) VALUES(Code)";\t\t\t\t\t\t\t\t\t\t\t\tSqlCommand cmd = new SqlCommand(strSQL, connSQLServer);\t\t\t\t\t\t\t\tcmd.ExecuteNonQuery();\t\t\t\t\t\t}\t\t\t\t\t\tcatch(Exception e) \t\t\t\t\t\t{\t\t\t\t\t\t\t\tAlertMsg("ERROR: " + e + ""); \t\t\t\t\t\t}\t\t\t\t\t\tfinally\t\t\t\t\t\t{\t\t\t\t\t\t\t\tconnSQLServer.Close();\t\t\t\t\t\t\t\tconnSQLServer.Dispose();\t\t\t\t\t\t}I will appreciate any help provided with the syntax.
VIEWS ON THIS POST

82

Posted on:

Wednesday 2nd January 2013
View Replies!

User registration and sign in for website visutal studio

I have spent the better part of two days trying to find some direction on this.\tI am trying to add a simple user registration and sign in page (and then a members only page) to a website.\tI am trying to use visual studio but am will to try anything anyone can suggest.Does anyone know of a good, step by step tutorial to do this\tI have found one video tutorial that mentioned it but\tquickly went through it as thought you already knew how to do it.\tI downloaded a Sybex manual and it discusses securing the site with a predefined user list but I cannot find how to enable the user to register and then sign in as a member\tAny direction to a tutorial, a FAQ, a guru in Africa...whatever...would be GREATLY appreciated I am in a time crunch for two sales presentations both of which need this one thing.THANK You in advance!
VIEWS ON THIS POST

61

Posted on:

Wednesday 2nd January 2013
View Replies!

How can i use macromedia projects in asp.net?

I designed a menu with macromedia dreamweaver.It created a javascript and a file like *.js by it self.I wanted to use this menu in my asp.net project therefore i copied the html codes and files from macromedia and pasted into my project.additionly i added the js files into my asp.net project.When i run my asp.net project i can see the menu but the menu is not working properly.It's colors must change when the mouse is on but not work.Macromedia project is created by javascript codes an html tags like this:Program creates an error message for OnMouseOut tag.How can i use macromedia projects in asp.net.I want to include the macromedia codes in my project like this:how can i do it
VIEWS ON THIS POST

267

Posted on:

Wednesday 2nd January 2013
View Replies!

Gridview paging

I have a gridview with paging enabled. It shows 15 items at a time. In a search there could be 100s of items. Obviously I only want a particular 15 items returned from the database at a time. How can I enforce thisThe way I would do it with a datagrid would be get the required number myself and set up paging with virtualitemcount. This isn't possible with gridviews. I've read documentation and haven't been able to get a clear cut answer. Any info would be great.
VIEWS ON THIS POST

77

Posted on:

Wednesday 2nd January 2013
View Replies!

rich text editor in asp .net

I'm looking for source code to add a rich text editor to my asp .net.\tthe website needs a rich text editor to be able to update an access database and retain the format when pulled in.\tWhere can I get code for a rich text editor in asp .net
VIEWS ON THIS POST

82

Posted on:

Wednesday 2nd January 2013
View Replies!

How to setup iis

I just installed vs2003 on my home machine and I would like to be able to create asp.net applications on it.\tI installed IIS but I don't know what to do next.\tWhen I try to create a project it says "Visual Studio has detected that the specified web server is not running asp.net 1.1.\tYou will be unable to run asp.net web applications or services."Can someone help me get started\tI searched some for it and checked out the FAQ section, but didn't see anything.
VIEWS ON THIS POST

83

Posted on:

Wednesday 2nd January 2013
View Replies!

inherits explanation

Can someone explain to me exactly what the inherits="xxxxxxxxx" does in asp .net.\tI have noticed that I cannot copy a asp .net project after it has been built out of the directory to a parallel directory and it still work, but it will work on a subdirectory of where it was created.\tThe inherits ="xxxxx" is always the directory where it was created, is this needed\tAlso is there a way to make it work if I copy it to a different direcotory other than a subdirectory of where it was created
VIEWS ON THIS POST

80

Posted on:

Wednesday 2nd January 2013
View Replies!

Browse folder window in asp.net

Hi Guys,Can I run a vbscript function in asp.net I want to run the following code to show a browse window to select a folder. When I run I get a error message "Microsoft JScript runtime error: Object expected". \t\t\t\t\t\tset objShell = CreateObject("Shell.Application")Set objFolder = objShell.BrowseForFolder (0, "Select a folder:", 0, "C:\")Set objFolderItem = objFolder.SelfobjPath = objFolderItem.PathobjPath = Replace(objPath, "\", "\\")Is there any way of showing a window to select a folder
VIEWS ON THIS POST

76

Posted on:

Wednesday 2nd January 2013
View Replies!

Decimal to 2 places?

I am calculating a percentage in a function and returning the result as a decimal.How can I format it to return to 2 decimal placesShould I be using DecimalMuch obliged.J ----------------------------------------------------------------------------------------A community development project in asp.net - http://www.whatsthehampton.com/
VIEWS ON THIS POST

82

Posted on:

Wednesday 2nd January 2013
View Replies!

Sorting a collection

HiI have written a function which passes the field name, sortargument (either ASC or DESC) and a collection of unsorted people to a back end module.This part works fine, but I do not know how to sort the collection!Can anyone give me any advice on this pleaseHere is the function in the back end module :-----------------------------------------------------------Public Shared Function Sort(ByVal SortColumn As String, ByVal SortArgument As String, ByVal UsersToSort As LegUsers)\t\t\t\tDim SortedUsers As LegUsers\t\t\t\tIf SortArgument = "ASC" Then\t\t\t\t\t\tFor Each user As LegUser In UsersToSort\t\t\t\t\t\t\t\t'sort ASCENDING by SortColumn\t\t\t\t\t\tNext\t\t\t\tElse\t\t\t\t\t\tFor Each user As LegUser In UsersToSort\t\t\t\t\t\t\t\t'sort DESCENDING by SortColumn\t\t\t\t\t\tNext\t\t\t\tEnd If\t\t\t\tReturn SortedUsers\t\tEnd FunctionEnd Class----------------------------------------------------------
VIEWS ON THIS POST

94

Posted on:

Wednesday 2nd January 2013
View Replies!

Missing Something Obvious?

Been away from coding for a few weeks due to holiday and excess other work but now I've come back something is stumping me.I currently have a form on a page. When the edit button is clicked it takes a value from a drop down list and assigns it to both a global variable and an object property. The form then fills itself with data and does not overwrite either variable or property.That works perfectly. The bit that doesn't is as follows:Once I've filled the form I can change the details and click submit. However, when the submit button is clicked both the property and variable are blank, infact the object is wiped entirely. The only place that makes any change to either the variable or the property is the edit button.To help clarify what I just said, the edit button code:CODE\t\tPrivate Sub Editbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Editbtn.Click\t\t\t\trefpk = Editddl.SelectedValue\t\t\t\trequ.RefNo = refpk\t\t\t\trequ.GetReq() 'all this does is get the correct db record and assign the fields to properties\t\t\t\ttbReqNo.Text = requ.ReqNo\t\t\t\t'conid = requ.ContractID\t\t\t\ttbCost.Text = requ.CostPlus\t\t\t\ttbValue.Text = requ.ReqValue\t\t\t\ttbDesBy.Text = requ.DesignBy\t\t\t\ttbIssuedBy.Text = requ.IssuedBy\t\t\t\ttbIssuedOn.Text = requ.IssueOn\t\t\t\ttbDesc.Text = requ.Description'At this point requ.RefNo and refpk are set correctly\t\tEnd SubThe submit button codeCODE\t\tPrivate Sub submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles submit.Click\t\t\t\tDim filename As String'At this point requ.RefNo and refpk are un set\t\t\t\trequ.ReqNo = tbReqNo.Text\t\t\t\trequ.ContractID = conid\t\t\t\trequ.CostPlus = tbCost.Text\t\t\t\trequ.ReqValue = tbValue.Text\t\t\t\trequ.DesignBy = tbDesBy.Text\t\t\t\trequ.IssuedBy = tbIssuedBy.Text\t\t\t\trequ.IssueOn = tbIssuedOn.Text\t\t\t\trequ.Description = tbDesc.Text\t\t\t\trequ.Locked = False\t\t\t\ttest = requ.WriteToDB(refpk) 'This simply attempts to write the modified record to the db and returns either an error or confirmation\t\t\t\tfilename = requ.ToExcel() 'Saves the data in an excel spreadsheet\t\t\t\trequ.mailer(filename) 'mails xxx to say its been saved\t\t\t\tResponse.Redirect("main.aspxfile=" & filename)\t\tEnd SubI'm sure this is something simple and obvious. Any suggestions
VIEWS ON THIS POST

153

Posted on:

Wednesday 2nd January 2013
View Replies!

Refer parent function in custom control???

i want to build a custom control that has a overridable function. This function can be overridden by the implementing page.e.g.:.ascx file has this functionpublic overridable FunctionName() as booleanend functionin .aspx i need to be able to override this function. like so:overrides FunctionName() as booleanresponse.write("Yeah!!!")end functionbut since the aspx file inhertis from page it is unable to override the custom control function.Can this be done\t I am open to other suggestions for implementing the same functionality... Known is handfull, Unknown is worldfull
VIEWS ON THIS POST

108

Posted on:

Wednesday 2nd January 2013
View Replies!

Major Session problem - urgent help needed please

In my Global.asax I have been using it to set the session variables however when I close the browser window and open up a new window I am still able to access pages as if I am logged in. This is a major security problem obviously and i'm not sure if its something which I have done wrong or an IE problem. Should I clear the session variable somewhere else in the global.asax. Can anyone suggest here I might have gone wrong.\tprotected void Session_Start(Object sender, EventArgs e){\t\t// login info\t\tSession["UserID"]\t\t= "";\t\tSession["Company"]\t\t= "";\t\tSession["VacID"]\t\t= "";\t\tSession["VacChangeID"]\t\t= "";\t\t\t\t\t\tSession["AppID"]\t\t= "";\t\tSession["AccID"]\t\t= "";\t\t\t\t}protected void Session_End(Object sender, EventArgs e){\t\t// on session end, redirect to home page\t\tResponse.Redirect("index.aspx");\t\t// clear all session variables\t\tSession["UserID"]\t\t= "";\t\tSession["Company"]\t\t= "";\t\tSession["VacID"]\t\t= "";\t\tSession["VacChangeID"]\t\t= "";\t\tSession["AppID"]\t\t= "";\t\tSession["AccID"]\t\t= "";}
VIEWS ON THIS POST

67

Posted on:

Wednesday 2nd January 2013
View Replies!

Accessing runat server control via client script

I am using the datagrid control in ASP.NET\tIt is a server side control.\tCan I reference it with client side script and set properties on the columns\t\tIf so how do I reference it\tFor example I tried document.all.DataGrid1.Columns(1).Visible = false And I get the error that it is null or not an object.
VIEWS ON THIS POST

78

Posted on:

Wednesday 2nd January 2013
View Replies!

Reading session variable from another project?

everybody!Does anybody know how can I read a session variable from another project To make it more clear I have a solution with several projects, only one of them has global.asax and web.config files. In this project I write some session variables, let it be session["user"] and session["state"] and then I call a page from some another project inside this solution. There I try to read these sesion variables but get nothing. Maybe I need to set up my application some way Or, I don't know... how to handle this problemThank you!
VIEWS ON THIS POST

67

Posted on:

Wednesday 2nd January 2013
View Replies!

Convert function into class?

Converting from Classic ASP -- using VB .NETOk - I have a function called checkNull in VBScript:CODEFunction checkNull(fieldValue2,decimals)\tIf isNull(fieldValue2) Then\t\tcheckNull = 0\tElse\t\tcheckNull = FormatNumber(fieldValue2,decimals)\tEnd IfEnd FunctionI am lost as to how to integrate this into ASP .NET.I can include it in my .aspx file and it works fine -- but I should be able to build a class with this function (and then a few others) -- and then import it into my aspx page shouldn't II'm guessing the file will look something like this:CODEPublic Class DataFormatting : Inherits PageFunction checkNull(fieldValue2 as double,decimals as integer)\t\tIf len(fieldValue2)=0 Then\t\t\t\tcheckNull = " "\t\tElse\t\t\t\tcheckNull = FormatNumber(fieldValue2,decimals)\t\tEnd IfEnd FunctionEnd ClassI call this file DataFormatFunctions.ascx (and I know I missed some important stuff in this file)....I hate to ask like this but I am lost and becoming frustrated:1. can someone glance at this and point me in the right direction -- that is all the text in my ascx file -- and I know I am missing something(s).2. what do I need to add to my main aspx page to make these functions available to the main aspx pag
VIEWS ON THIS POST

113

Posted on:

Wednesday 2nd January 2013
View Replies!

How to work with MS Word 9.0 and ASP.NET?

I have a client that has not upgraded to Office 2003. They still use Office 2000. I have created some reports using a datagrid and converting the page to Word with the following:\t\t\t\tIf Not Page.IsPostBack Then\t\t\t\t\t\tResponse.AddHeader("content-disposition", "inline; filename=BP_CaseStatus.doc")\t\t\t\t\t\tResponse.ContentType = "application/msword"\t\t\t\t\t\tResponse.BufferOutput = True\t\t\t\t\t\tResponse.ContentEncoding = System.Text.Encoding.UTF8\t\t\t\t\t\tResponse.Charset = "UTF-8"\t\t\t\t\t\tEnableViewState = False\t\t\t\t\t\tCall buildTheCalendar(Request.QueryString("CalType"))\t\t\t\tEnd IfThe users complain that when the report prints the pages do not break properly. They break in the middle of the cells which cuts off data.Does anyone have code samples that show how to correct this problem
VIEWS ON THIS POST

226

Posted on:

Wednesday 2nd January 2013
View Replies!

TagPrefix / Include Question

I get an error on the following line of code:CODEParser Error Message: File or assembly name CrystalDecisions.Web, or one of its dependencies, was not found.Source Error: Line 1:\tLine 2:\tLine 3:\tSource File: c:\inetpub\wwwroot\CrystalReporter\Report.aspx\t\tLine: 1 Assembly Load Trace: The following information can be helpful to determine why the assembly 'CrystalDecisions.Web' could not be loaded.=== Pre-bind state information ===LOG: DisplayName = CrystalDecisions.Web, Version=9.1.3300.0, Culture=neutral, PublicKeyToken=*KEY*(Fully-specified)LOG: Appbase = file:///c:/inetpub/wwwroot/CrystalReporterLOG: Initial PrivatePath = binCalling assembly : (Unknown).===LOG: Publisher policy file is not found.LOG: No redirect found in host configuration file (C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet.config).LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\config\machine.config.LOG: Post-policy reference: CrystalDecisions.Web, Version=9.1.3300.0, Culture=neutral, PublicKeyToken=*KEY*LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/crystalreporter/7d8ae7ce/4d9204c7/CrystalDecisions.Web.DLL.LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/crystalreporter/7d8ae7ce/4d9204c7/CrystalDecisions.Web/CrystalDecisions.Web.DLL.LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CrystalReporter/bin/CrystalDecisions.Web.DLL.LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CrystalReporter/bin/CrystalDecisions.Web/CrystalDecisions.Web.DLL.LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/crystalreporter/7d8ae7ce/4d9204c7/CrystalDecisions.Web.EXE.LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/crystalreporter/7d8ae7ce/4d9204c7/CrystalDecisions.Web/CrystalDecisions.Web.EXE.LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CrystalReporter/bin/CrystalDecisions.Web.EXE.LOG: Attempting download of new URL file:///c:/inetpub/wwwroot/CrystalReporter/bin/CrystalDecisions.Web/CrystalDecisions.Web.EXE.*KEY* is my registration key.I am probably missing something simple, Can someone tell me what I am forgetting to include\t
VIEWS ON THIS POST

93

Posted on:

Wednesday 2nd January 2013
View Replies!

SkmMenu and IFrames

Has anyone ever used the skmMenu w/ Iframes If so could you supply an example http://www.skmmenu.com/menu
VIEWS ON THIS POST

78

Posted on:

Wednesday 2nd January 2013
View Replies!

Defining a Public variable

,\t\tHow do I define a variable as public so that no matter what sub routine I am in the variable still holds it's value.\tFor instance, I want to define MYVAR to be public as a string.\tThen I will pass a textbox value to this variable like this; MYVAR = textbox1.text, from user input on the form.\tI need MYVAR to hold that textbox value unless the user changes the value in the textbox again.\tEverything I have tried so far only holds the value in the current sub routine that assigns the value.\tMYVAR clears as soon as that sub routine is ended.
VIEWS ON THIS POST

77

Posted on:

Wednesday 2nd January 2013
View Replies!

I can't see the VB.NET's controls in the internet

I made a very simple ASP.NET application and when I publish it in the www.mycompany.com, I can see the index.aspx without the VB.NET control I used.Thanx in advanced
VIEWS ON THIS POST

104

Posted on:

Wednesday 2nd January 2013
View Replies!

__doPostBack General Question

My understanding of the __doPostBack function is that it will load the __EVENTTARGET.value and __EVENTARGUMENT.value with the name of the control that has initiated the "post"\tThis makes perfect sense to me, because this is how the server eventually knows which control's event to fire.BUT... the __doPostBack function IS NOT CREATED if, for example, all you have on your web form are 2 command buttons....and here's my question:\tIf all you have on your web form are to command buttons, and there is no\t__doPostBack function created, how does the server know which of the 2 buttons was clicked\t
VIEWS ON THIS POST

103

Posted on:

Wednesday 2nd January 2013
View Replies!

Multiple DropDown Boxes - Best Practice

I'm currently working on a new application and it has brought up a question of the best method for dealing with a page of many dropdowns, each of affecting the items in another. I'll try to explain the situation a bit.I have a page with 4 dropdown lists which are all at populated from an SQL database. The user first selects a name from a list populated on page load. Another drop down allows the user to select a device type (i.e. computer, printer, scanner). When either of these are changed the Devices dropdown updates from the DB with a list of all the devices of the chosen type for the chosen user. Choosing a different Device Type also updates the items in a category dropdown.Hope that makes some sense!What I'd like to know is, is there a best practice for coding this style of page. At the moment it works but I'm not sure the code is that optimised. For example choosing a new user causes the app to have to look the username up in the database just to get their userID. I dont really want to do this as it has already looked to that table in the db when populating the list in the first place. But how can I know what userID goes with the user in the list The app then looks that up in the DeviceLine table to find all devices for that user pulling out their DeviceID's. Then it looks to the DeviceTable to get the actual device information based on the DeviceID.This is a lot of calls to the database. The main problem I have with this method is populating the users from the database and then looking back to it to pull out the userID. Is there a way to associate the id with each entry in the dropdownbox without displaying it I've considered populating arrays for all the data on page load but is this a good idea as much of the data won't be needed and therefore I'm wasting time pulling it all from the database in advance. I know this is probably unclear as it's a fairly open-ended and complex question. ideas welcomed.Cheers, Steve G (MCP)
VIEWS ON THIS POST

121

Posted on:

Wednesday 2nd January 2013
View Replies!

Compiler Error in System File

Hi. I am not sure how to tackle this error. The error is in a file that i didn't wite ... a system file i think. It shows the location of the file but i don't want to muck about in files that i didn't produce. Does anybody recognize this thanks in advance.Error Message: Compiler Error Message: CS1518: Expected class, delegate, enum, interface, or structSource Error:CODELine 149:\t\t\t\t#line hiddenLine 150:\t\t\t\tLine 151:\t\t\t\tpublic default_aspx() {Line 152:\t\t\t\t\t\tSystem.Collections.ArrayList dependencies;Line 153:\t\t\t\t\t\tif ((ASP.default_aspx.__initialized == false)) {
VIEWS ON THIS POST

80

Posted on:

Wednesday 2nd January 2013
View Replies!

Correct Page Timing Out (or other suggestions welcome)

Background:User has an ASPX page to input several report parameters.The Input Page has an OWC component that reads in from an XML Data Source.I have an ASPX page that Generates the XML Data for the OWC control.Process:\tUser enters parameters, clicks button to generate report.\tOWC control is rendered with input being from the XMLsource provided by my XML only page.In general, this is working fine.However, if the user selects a report with a tremendous amount of detail, the aspx page that generates the XML Document appears to time out after approximately 5 minutes.One example of this data is a query that returns a dataset with 408 rows.\tEACH of the 408 rows are parsed into individual 30 row records in the OWC object.\tEach OWC row has 27 cells filled.\tSo, in this example, the XML datafile needs to create data for 330,480 individual cells.The user does not mind waiting the 1/2 hour (or whatever the time period is) to generate the page.\tI just need to get it to generate!Suggestions would be most appreciated
VIEWS ON THIS POST

81

Posted on:

Wednesday 2nd January 2013
View Replies!

Forms Authentication

I am new to using this type of authentication. Here is how I want it to work. We have a portal that will know who is logged in. I want the web page to authenticate the user based on the QueryString UID...no password...however I don't want a log on screen...I just want the authentication to go by itself when the page realizes it has a UID being sent to it...any ideas
VIEWS ON THIS POST

118

Posted on:

Wednesday 2nd January 2013
View Replies!

Making Menus

Under old asp, I could create a menu page, and #include it in all my other pages.Now in .Net, do I need to do this, or could I create a Menu Class, and it's associated code behind, but then, how would I display it on all appropriate pages TIAK
VIEWS ON THIS POST

138

Posted on:

Wednesday 2nd January 2013
View Replies!

SQL - extra carriage return in output file

I'm getting a carriage return in my output file after each of my select statements and I don't want the carriage return.c:\Illinois_temp.sql is basically a command file that contains the following:----------------------------------------------------------set nocount on select hdr from Illinois_Cig_Return where\t\t\t\t\t\t\t\tIllinois_CigReturn.row = 1 select records from Illinois_Cig_Return where not (Illinois_Cig_Return.records is null) order by Illinois_Cig_Return.row select eof from Illinois_Cig_Return where not (Illinois_Cig_Return.eof is null) -----------------------------------------------------------The first select statement gets one record.\tThe second select statement will get many records and the third select statement gets one record.\tMy output which is below has a carriage return (and possibly a line feed) after each select statement has been processed and I don't want it there.I run a query that contains these 2 statements and uses the c:\Illinois_temp.sql file:set @cmd = 'osql -i"c:\Illinois_temp.sql" -E -s -h-1 -d"Order" -w641 -n ' +\t\t\t\t\t\t\t\t\t'-o' +\t\t\t\t\t\t@folder +\t\t\t\t\t\t\t\t@fileexec @cmdshell_result = master..xp_cmdshell @cmd,no_output-----------------------------------------------------------My output file looks like this:*************HDR19E18RC6A\t\tM \t\t\t\t\t\t2020000022124500 \t\t\t\t\t\t3030000122124500\t\t\t\t\t\t3600000122124500*************EOF00000016 Any suggestions
VIEWS ON THIS POST

170

Posted on:

Wednesday 2nd January 2013
View Replies!

can not download excel files from a web server, help!!!

I have a real serious problem. I made several web applications with ASP.NET and with a button that let you download an excel file of the information presented on the page. Everything began to fail on tuesday 17. The option for downloading the excel file is not working. Nothing in the code has changed and nothing in the web server. the real problem is that it is not working but not for all: in some cases it works!!. Here are my diagnostics:1. If I use IE, in some PCs I can download the files and in others I can't. I have used IE5 and IE62. In netscape it always works.3. Before 17, it was working in every browser.You can check this web page in:http://ofi.mef.gob.pe/proveedor/default.aspx(it's in spanish)I'm not sure if this is the correct forum but ....Please help me!!!ByeJose Carlos JOSE CARLOS ARAMBURUjosecarloaa@hotmail.com
VIEWS ON THIS POST

76

Posted on:

Wednesday 2nd January 2013
View Replies!

Save window browser

!Does anybody know if it is possible to create/open a Save window browser using an ASP.net button.What I'd like to do is allow a user to save the contents of a datagrid onto their computer, but allow them to choose where to store it.\t(How many times have you downloaded something and not paid attention to where the file is saved, then can't find it!)I've found that I could do the save part of it using an XML user control, but I've not had much experiance with them, and as far as I could I could only specify a location! Is this true
VIEWS ON THIS POST

63

Posted on:

Wednesday 2nd January 2013
View Replies!

Keep VS.NET from modifying HTML

In some respects Visual Studio is like Front Page in that it likes to add things to your code and "beautify" it. I like to arrange my HTML code in a way that it makes it easy for ME to read and when it automatically repositions things it just makes them more dificult. The problem is that it not only rearranges it, but it changes Align="Center" to Align="Middle". I thought I was seeing things, but I have gone in and changed it back and then when I saved it and reopened it, there it was again, changed back.I've gone into options, but I can't find a way to turn this off. Anyone know the way to do this
VIEWS ON THIS POST

54

Posted on:

Wednesday 2nd January 2013
View Replies!

OleDB Access2000 coding with 2 parameters in sp, help?

Using Access 2000Suppose I have a stored procedure or query like "Select * from Customers where Cust_ID = AND Cust_Name= "I am not able to code the OleDb connection,OleDBCommand to retrieve the record.Using only one parameter however, it works..."Select * from Customers where Cust_ID = "How do I have to code for additional parameters ... typically a "Text" or "VarChar" data type. Also in Access 200 when you want to test from the design wizard , although I have 2 parametes, the "" only prompts me once when I try to run or "open" the stored procedure. Shouldn't it prompt me twice for 2 parameters\tIf not how do I enter sayCust_ID=22\t& Cust_Name = "Bob" when I'm prompted only once with "" .. so that the correct record is retrieved
VIEWS ON THIS POST

191

Posted on:

Wednesday 2nd January 2013
View Replies!

trapping errors from query string parameters

when submitting data to a page via the querystring egint newsID = int.Parse(Request.Params"id".ToString());obviously the potential exists if the user messes with the number in the querystring to produce errors.I normally use try / catch to trap any errors and display a message I just wondered if any other users had found a better way of achieving this
VIEWS ON THIS POST

204

Posted on:

Wednesday 2nd January 2013
View Replies!

Mouse over with DropDownList

Has anyone seen an open drop down activate on mouse over\tIt would be a nice feature if the user could open up a drop box, say with 50 items, and the mouse down the list while it is open and see a java activated message.\tJust a thought.
VIEWS ON THIS POST

63

Posted on:

Wednesday 2nd January 2013
View Replies!

Simple... passing variable in a hidden form field

I don't know how to do this in ASP.NET.\tI've got a page which grabs the stored username of the logged in user.\tThen it displays that username in a label.\tI also need to be able to pass that username as a hidden form field back to the same page when the form is submitted.In the code below, the username is 'major_key' and I want to be able to set the value of a hidden form field to this so I can then append it to the url when the page is submitted...see the action attribute of the form.\tBasically, I need the code for the hidden field and the action attribute.
VIEWS ON THIS POST

55

Posted on:

Wednesday 2nd January 2013
View Replies!

using ascx controls

I want to have just one page "default.aspx" and then load all other content into a placeholer depending on what was chosen from the menu.In the DB I have a table tbl_modules which gives the name and path of the ascx files.so the URL would look something like default.aspxmodule=ModIDThis is easy enough with records to a grid but I just can't figure out the best way (or any way) to retrieve the value from the DB table and put it into the placeholder. help appreciatedMany
VIEWS ON THIS POST

62

Posted on:

Wednesday 2nd January 2013
View Replies!

Edit form in asp.Net when I have a lookup field

hi I have a Datagrid where I click on the id to open another aspx page to edit the selected record. I was able to pass the selected row's id\tand use it in the second page to pull the record into an edit form. The issue I am facing is I have a lookup field in the selected record and I got stuck not knowing how to show the user the values in the combo box for his/her selection in the edit mode
VIEWS ON THIS POST

244

Posted on:

Wednesday 2nd January 2013
View Replies!

user control postback not firing

I have a radiobuttonlist, dynamically created, which implements postback.If I place this directly onto a page it works great.But, if I place it onto a user control page and then place this user control onto a page the postback does not fire.It appears I am not setting the ID's properly. If this is the case, what are the rules for setting ID's on dynamically created controls so they work on both pages and embedded pagesMany
VIEWS ON THIS POST

69

Posted on:

Wednesday 2nd January 2013
View Replies!

instert into MS access with asp.net/vb

experts,I'm a newbee to ASP.NET.\tAnd I have been struggling solving this problem.\tBut I can't do it.\tCan you please help me get over this wall\tBelow is the code and error message:\t\t\t\t\t\tRegisterForm\t\t\t\tSub SubmitBtn_Click (Source As Object, ByVal E as EventArgs)\t\tdim listError as string\t\tdim connectionString as string\t\tconnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\myProject\WebApplication1\UserDB1.mdb;"\t\tdim objConn = New OleDbConnection( connectionString )\t\tdim objCommand\t\ttry\t\t\t\tobjConn.Open()\t\t\t\tdim InsertSQL as string\t\t\t\tResponse.Write("Connection established! ")\t\t\t\t\t\t\t\tdim fname as string\t\t\t\tdim lname as string\t\t\t\tdim sname as string\t\t\t\tdim eml as string\t\t\t\tdim pwd as string\t\t\t\tdim sex as string\t\t\t\tfname=FN.text\t\t\t\tlname=LN.text\t\t\t\tsname=ScreenName.text\t\t\t\teml=Email.text\t\t\t\tsex=Request.Form("Sex")\t\t\t\tpwd=Password.text\t\t\t\t\t\t\t\t'Create Insert statement\t\t\t\tInsertSQL ="insert into Users (Email, FirstName, LastName, ScreenName, Sex, Password) "\t\t\t\tInsertSQL = InsertSQL & "values('" & eml &"', '" & fname &"', '" & lname &"', '" & sname &"','" & sex & "', '" & pwd &"');"\t\t\t\t\t\t' Create OleDbCommand object\t\t\t\tdim cmdInsert as New OleDbCommand(InsertSQL, objConn)\t\t\t\tcmdInsert.ExecuteNonQuery()\t\t\t\t\t\tResponse.Write("Data Recorded")\t\t\t\t\t\tcatch Err as Exception\t\t\t\tlistError = Err.ToString()\t\t\t\tResponse.Write(listError)\t\t\t\tend tryEnd Sub\t\t\t\tERROR:System.Data.OleDb.OleDbException: Syntax error in INSERT INTO statement. at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(Int32 hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at ASP.RegisterForm_aspx.SubmitBtn_Click(Object Source, EventArgs E) in C:\myProject\WebApplication1\RegisterForm.aspx:line 39 Line 30 contains:\tcmdInsert.ExecuteNonQuery()\t\tThank you for your time,
VIEWS ON THIS POST

67

Posted on:

Wednesday 2nd January 2013
View Replies!

Waring: Page Expired

When a user hits the back button, how do you have the "Warning: Page Expired" message appearWe've tried using the Response.Cache object, without success.
VIEWS ON THIS POST

73

Posted on:

Wednesday 2nd January 2013
View Replies!

Retrieving check box value in ASP.NET

OleDbConnection myConnUserID1 = new OleDbConnection(strDSNUserID); OleDbCommand myCmdUserID1 = new OleDbCommand(strSqlUserID, myConnUserID1);OleDbDataReader drUserID1 = null; myConnUserID1.Open();drUserID1 = myCmdUserID1.ExecuteReader(); \t\t\t\tif(drUserID1.Read()) {txtUserName.Text\t= drUserID1.GetString(4); txtUserID.Text\t\t= drUserID1.GetString(0);txtPassword.Text\t= drUserID1.GetString(1);txtEmail.Text\t\t\t= drUserID1.GetString(16);lblDealerDesc.Text = drUserID1.GetString(11);if(drUserID1.GetString(63) == null){\t\tInternaluser.Checked =false;}else{\t\tInternaluser.Checked =true;}}I am getting the error is given below,The data value could not be converted for reasons other than sign mismatch or data overflow. For example, the data was corrupted in the data store but the row was still retrievable. Here I want to retrieve the internal check box value from database and assign value back to the check box in the web form. But I am not able to see the value for drUserID1.GetString(63)..Give me some good suggestion on this
VIEWS ON THIS POST

75

Posted on:

Wednesday 2nd January 2013
View Replies!

editable dropdownlist box

is there a property to allow the dropdownlist box become 'editable'\t
VIEWS ON THIS POST

136

Posted on:

Wednesday 2nd January 2013
View Replies!

Retrieving QueryString in Mobile Form

In the Page_Load routine in my mobile web page, I'm having trouble retrieving a caller ID from the calling browser.\tThe following line works in a conventional .aspx page, but not in my mobile page:\tlngDeliveryPersonID = Int32.Parse(HttpRequest.QueryString("DP"))The error message is:BC30469: Reference to a non-shared member requires an object referenceCan anyone advise
VIEWS ON THIS POST

69

Posted on:

Wednesday 2nd January 2013
View Replies!

Tiling Check Boxes

,gonna need to do this later this week, and thought I'd throw it out in case someone knows how to do it:I'm going to display a listing of checkboxes to the user. But I don't want it to be a vertical list. What I'd like is it to go accross a certain number, then start a new row. So if I have 9 checkboxes to display, it would look like:checkbox1\tcheckbox2\tcheckbox3checkbox4\tcheckbox5\tcheckbox6checkbox7\tcheckbox8\tcheckbox9I've played with the checkbox list before, but I don't recall it being able to do what I need. And worst case I could just dynamically build the checkboxes in the code behind and fill a table, but does anyone know of a cleaner way to achieve this
VIEWS ON THIS POST

78

Posted on:

Wednesday 2nd January 2013
View Replies!

Good book for learning ASP.net?

I am coming from a VB 6.0 background, and I have been enlisted by a friend to help build database driven web-site using MySQL and ASP.net (basically going to archive a bunch of documents online, and need to be able to access them on demand). Can anyone recommend a good book or two to help me pick up what I need to know
VIEWS ON THIS POST

127

Posted on:

Wednesday 2nd January 2013
View Replies!

Where Am I Going Wrong??????

I want to populate the records existing in SQL Server DB table in a DropDownList. This is what I have done:Sub Page_Load(obj As Object,ea As EventArgs)Dim objDS As DataSetDim objConn As SQLConnectionDim objDapter As SQLDataAdapterobjConn=New SQLConnection("Server=(local);Database=DBName;UID=sa;PWD=")objDapter=New SQLDataAdapter("SELECT CName,FDate FROM Company ORDER BY CName,FDate",objConn)objDS=new DataSet()objDapter.Fill(objDS,"Comp")cname.DataSource=objDS.Tables("Comp").DefaultViewcname.DataBind()End SubBut I am getting an error which says "Code blocks are not supported in this context" which points to the line. Where am I erring How do I rectify it
VIEWS ON THIS POST

70

Posted on:

Wednesday 2nd January 2013
View Replies!

ASP.NET Quickstart Tutorial Source code not displaying

HiI am working on\tMS Visual Studio Enterprise Architech - English. When I open the link in ASP.NET Quickstart tutorial Samples 'View Source Code' Link in the samples It displays the following message(not showing original code).Source Viewer Error: cannot show this fileEither the file does not exist, or your configuration settings for the source viewer do not allow files in this directory to be viewed. To edit the configuration settings, see the web.config file at the root of the quickstart directory. Change the setting to point at the root directory of the quickstart. files under this directory will be accessible to the source viewer.\t\t\t\t\t\t\t\t\tCould anyone help me out to resolve this issue!Karthik Baladevlnk@hotmail.com
VIEWS ON THIS POST

314

Posted on:

Wednesday 2nd January 2013
View Replies!