Forms Data Controls :: When Pick A New Instructor, The Value Put Into The Table Is Basically Random?
Mar 11, 2010
Why is this so hard? Seems like a simple task:
Here is what I am doing. Gridview to list a table. The table is mostly keys so I display one value and have a dropdown list to update the Instructor (key). Like one normally does, the dropdown list has a display value and a 'hidden' value which should be the value updated to the table, in the UPDATE event.
It does not work.
(1) When I click 'edit' the value in that field that was on the list of the grid is NOT the same value in the DropdownList, so the index of the ddl is not coming from the value on the grid (which is a hidden field on the grid).
(2) When I pick a new instructor, the value put into the table is basically random.
I would debug it but I have no idea what events to look at or how to look at the actions taking place during edit and update.
[Code]....
View 2 Replies
Similar Messages:
Feb 13, 2012
I have a situation where I'm using a single Masterpage and two Content Pages. The Master page basically contains a menu built using an HTML Table. The one Content Page contains the marjority of my site content. The way the menu works is that when user selects a menu item, a javascript function executes that evaulates which menu item was selected.
Now, this is where I'm not sure what to do next. Should I load the next Content Page in this javascript function or somewhere in the CodeBehind of the Content Page? I'm trying to find examples where I can load a page using Javascript but not having any luck.
View 20 Replies
Dec 13, 2010
In my application I have a formview, used for inserting/editing records in a product details table.
My problem is now, that one of the fields is used for the filename of a productimage, uploaded to a folder on the server from another page.
When inserting - or editing - a record, it should be possible somehow to get list of the files in the productimages folder, select one, and then store the filename (no path needed) in the database. basically I need some kind of 'file-picker' to select the filename and put it into a textbox. It could be anything from a dropdownlist to something more sofisticated - as long as I can include it in my formview.
View 6 Replies
Feb 12, 2010
I have a DataList which I am populating using SqlDataSource. DataList has four columns as follows
1) Name
2) ProductID
3) ImageFileName <<<<< this DataKeyField
4) Unit Price
I want to pick "ImageFileName" whenever mouse hovers the row and then pass that ImageFileName to JavaScript function.
View 10 Replies
Jun 18, 2010
Say If got these dates in a TextBox 2010/06/19,2010/06/20,2010/06/21,2010/06/22,2010/06/23, i want automicly my Start label to pickpup the lowest date and Label End to pickup the highest Date Start: [2010/06/19] End: [2010/06/23] between brackets is my label
View 16 Replies
Jun 12, 2010
How to create sql server table with unique random identity between 45365 - 5782155129452 ?
View 5 Replies
Apr 26, 2012
i have been implementing your Autocomplete routine, However there does seem to be a problem in that it does not allow you to pick a value through a mouse click. The enter key is fine.
View 1 Replies
May 20, 2010
the app doesent pick up controls
View 5 Replies
Dec 15, 2010
I create a table as picture below :
when I insert any character to column Name then A new string random will auto insert into column Random (picture below) I had used Trigger but It was error !
I want to column Random use to code :
DECLARE @myid uniqueidentifier
SET @myid = NEWID()
insert into table_1 values(@myid, substring(CONVERT(varchar(255), @myid), 1, 5))
but It must auto like column Number (column Number is Identity)
View 1 Replies
May 22, 2010
I have a SqlDataSource that pulls data from a table randomly. When I get this data in a formview, i want to be able to page through it (< prev next >) in that random order. Make sense? So in other words, whenever the query is run, I want it to pull a list from a table in a random order (which I've already got). I just want to be able to click next and prev within that random order?
View 2 Replies
Jul 14, 2010
I have an asp.net 2.0 web app and one of the pages uses a grid to add/edit items before exporting the contents to excel. The items in the grid are selected based on a dropdown list--after the item in the list is selected, the grid goes and gets the items, populates a dataset and binds the dataset to the gridview. Some of my users are experiencing an issue where after deleting a random number of rows, a row not deleted will disappear or reappear. Though I have witnessed the behavior, I cannot duplicate it on my machine where the developement occurs (Win XP Pro, IIS 5.1, vwd2005 express). The windows 2003 server uses ASP.Net 3.5
Here is the code related to editing and deleting:
[Code]....
If I had to make a guess as to what was occuring, I would say that it appears at times to retain the deleted item's index after the grid is sent back to the user and tries to delete another row. But like I said, I can't duplicate the problem on my dev machine. if this might be caused by .Net 3.5 trying to run a 2.0 site?
View 5 Replies
Apr 21, 2010
I'm trying to select a random record from my database and display the details of the record on screen. The table I am using is the aspnet_Users table which as I'm sure you all know holds the details of users. After a bit of googling, I found the following code:-
[Code]....
I've built my page and I get no errors which is a great start I just can't seem to figure out how to then display the results of this query on the page. I just want to display the username for the record that is selected.
View 16 Replies
Jul 17, 2010
i need to show for every refresh of page five categories, every time different how can i do? in SQL do not exist select RND(field)...
View 5 Replies
Nov 18, 2010
i use this query as my sql query :
SELECT TOP 5 * FROM MyTableName WHERE ID=@ID ORDER BY NEWID()
As you may know it gets 5 records by random. I use it with dataset and bind the listview to this dataset and in ItemDataBound i want to do some programming (like making some controls visible or invisible) i need itemindex.
but the question is : how can i get the itemindex of a listview when sql query selects records randomly?
View 8 Replies
Nov 10, 2010
I would like to use the image (file) upload control to allow users to basically create an avatar for a record they manage.I would like to enforce the following:1) Type (PNG only)2) Dimensions (X pixles by X pixels)3) Size (less than XYZ kilobytes) 4) Rename the file to something organized (for my sake)5) Not open some gaping hole in my file system (security)Some of these are pretty easy to do it seems.
View 1 Replies
Jul 4, 2010
In my employe db i want only employes who has a specific word in a column to be viewed in my repeater.
lets say we have names of the employes in one column and what department they belong to in the other column.
If a employe belongs to "economic" department and i want to only show the persons that works in that apartment.
What sql query could i use for that?
something like this ?:
SELECT * FROM [employes] WHERE ([apartment] LIKE '%' + economic + '%')
View 2 Replies
Jun 15, 2010
What is the basic rule for calling Oracle StoredProcedure from .NET
View 7 Replies
Jul 17, 2010
I visited this Link to study about Factory design pattern.http://wiki.asp.net/page.aspx/310/factory/ But i am confused about it still. What i understood is that we must use an Interface to define a class .In the interface we will give the prototype of functions and later on we will define it in concrete class. Is that simple concept is Factory design pattern ?
View 13 Replies
Apr 15, 2010
Is there any method by which we can retrieve random data from a dataset or rather directly from a table.
For example, I have around 30 questions in my table, I just wanted to display 20 among them and that too in a random order without the same item repeating. Can we achieve this using SP or through some Dataset manipulation?
View 1 Replies
Feb 5, 2010
I use a calendar to pick a date that I want to store in my MSSQL Database. I use the form format, like 2010-01-27 (european date format) with no time info. What MS SQL Date-type should I store this date in?
View 4 Replies
Mar 29, 2011
I´m looking for some advice on how to create an table showing bookings, a table containing mon-sun on the horizontal axis and times at the vertical. The admin is able to edit each days bookable times (first bookable time, last bookable time) - The slottime is constant.
What I want is let the admin click on eacha cell to remove it/add it when removed. And other features as well, like create an booking for a customer.
What would be the easiest way to achive this, at the moment I use dynamic links since I cant get asp:buttons to work and the code to create an dynamic asp:table row by row and this produces some ugly code.
So any advice on how to achive such an "schedule".
View 1 Replies
Jun 22, 2010
I have combined my SQL result to display in drop down list in such manner:
" SAV 123-423-231 "
" CUR 234-234-212"
User selects which account to view. So if the user selects SAV 123-423-231, I have to pass in the bank account number. How do I do that?
By split? I tried doing this:
ddlAcc.text.split(" ")
View 10 Replies
Jan 3, 2010
I am fairly new to ASP.Net and web programming in general and I am having issues trying to add values from a dropdown list in my gridview to another table.
Here is my scenario. I have 2 tables in my SQL Express DB. When editing the values of table2 in a gridview, I would like to show some data from table1 in a dropdown so users can select a value from table 1 and enter that value in table 2.
I have the Gridview setup to show table2 data.
I created a field template and inserted my dropdown list and linked it to my table1 data source.
When I run my web form, I can click to edit one of the fields in the gridview, and my dropdown list correctly displays the data from table 1, but when I try to update the table2 with the dropdown value, it doesn't correctly update. The row in table2 never updates.
posting the dropdown value from table 1 into the appropriate field in table2..
Again, I am new to this and have been following the tutorials etc on this site, but can't find one pertaining to this topic.
View 1 Replies
Aug 11, 2010
I am working on a web app for an online photo album. It is the last project in Scott Mitchell's book: "ASP.Net 2.0 in 24 hours".
I am creating a page where users can enter new photo images. The functionality for uploading an image will come later. I am working on just inserting a new row into the Pictures table with an optional category, a required title and a required description.
I am getting an error when I try to insert a new row.
Here is a screenshot of the page with a shot of the dropdown list.
The Categories are user-specific. I am getting the correct values retrieved.
[URL]
There are two pretty simple database tables involved here.
NOTE: The CategoryID and PIctureID are both autoincrement integer columns.
[URL]
The page uses a DetailsView that uses a SqlDataSource that uses the Pictures table. (The DetailsView's Default Mode property is set to "Insert". The "Enable Inserting" checkbox is also checked.)
The dropdown list uses a dropdown control that uses a SqlDataSource that uses the Categories table.
When the "Insert" button is clicked the CategoryID value associated with selected (Category) Name on the dropdown list will be used along with the Title and Description values to insert a row in to the Pictures table. (If no Category value is selected, then a null value will be used for the CategoryID. This is OK because the CategoryID column in the Pictures table allows nulls.)
My problem is that I am getting this error:
Cannot insert explicit value for identity column in table 'Pictures' when IDENTITY_INSERT is set to OFF.
(FYI: I have the full version of both Visual Studio and SQL Server.)
Here is my source code for the page:
[Code]....
View 3 Replies
Mar 16, 2011
how to cause an event to fire when picking a date from GMDatePicker?
Somewhat similar to SelectedIndexChanged from dropdown list...
View 2 Replies