Web Forms :: Retrieving And Displaying Information Using ASP
Jan 28, 2011
I want to produce a relatively simple webpage which would contain a drop-down list and a button. When the user makes a selection on the drop-down list and clicks the button (or image), the page would query a SQL database and output the results of that query to an iFrame that would be embedded in the lower half of the page. I've managed to figure out the necessary code for populating the drop-down list by using a stored procedure, and I've managed to figure out a way of having the resultset displayed on a second page but I want to now finesse it and get all of the information displayed on a single page.
View 1 Replies
Similar Messages:
Sep 29, 2010
I have an aspx form that is meant to add a new prescription for a doctor system. I've created the database and dataset needed, but the problem is that the doctorID and patientID has to be able to select from the database, not entered in as a plain text. The form look something like this (I did this in DetailsView in MS Visual Studio 2010):
DoctorID: [textbox]
PatientID: [textbox]
prescription details: [textbox]
Insert Cancel
as you can see, only the prescription details needed to be entered in and the doctorID and patientID needed to be selected from the database (in a dropdown list maybe) and it shouldnt allow any text to be entered in. I did the above tables using a DetailsView in Microsoft Visual Studio 2010. However I can't seem to make the doctor and patient ID field be dropdown box which allow me to choose the current doctor and patient in the Doctor and Patient table in the databse. Can anyone tell me how to do it with Design View in Visual Studio?
View 2 Replies
Mar 21, 2012
I am retrieving a word 2010 document that has been uploaded to a sql 2005 database. When I subsequently download and open the document in a word window it states the file is corrupted and gives the user the option of repairing the file for display. This always works fine but the corrupted message is always presented for all DOCX files. The DOC files from an older Word version work fine without incident. the section of code, VB.NET, for streaming the document out to display in Word is:
Dim bytes() AsByte = CType(dt.Rows(0).Item(2), Byte
())
Response.Buffer = True
Response.Charset =
""Response.Cache.SetCacheability(
[Code] ....
Where the content type value, in this case, is "application/vnd.openxmlformats-officedocument.wordprocessingml.document" (rather than "application/vnd.ms-word").
The filename is simply the full name of the document and the data itself is loaded into the Bytes var. I got some time back... it just doesn't like the new and improved word 2010 files.
View 1 Replies
Mar 9, 2011
I need to create a pdf file from data obtained from a database. I have to retrieve the data from database and generate these data as a pdf file.I would like to have pointers (helpful information).
View 5 Replies
Sep 28, 2010
i have a problem that only shows if EntityDataSource present on aspx pages ,interesting thing it's just occures when i'm refreshing the page (F5) or viewing it again and it's driving me crazy it's seems to be a bug with entity framework because i tried it with another project and i just get the same error:
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
[Code]....
View 1 Replies
Apr 11, 2010
I'm trying to parse a page that has different sections that are loaded with a Javascript __doPostBack() function.
An example of a link is: javascript:__doPostBack('ctl00$cphMain$ucOemSchPicker$dlSch$ctl03$btnSch','')
As soon as this is clicked, the browser doesn't fetch a new URL but a section of webpage is updated to reflect new information.
What would I pass into a urllib function to complete the operation?
View 1 Replies
Feb 24, 2010
I need to query a database and return list of names, then I need to display their pictures and information in a Web Page, using ASP.NET or using JavaScript. The main concern is displaying the pictures and information dynamically on the page in an organized way.
View 5 Replies
Apr 20, 2010
I am using mobile list control inside that i inserted a label when i bind any dataset to that list it is not displaying any information. In msdn it is mentioned the mobile list control is equivalent of web control is datalist. The code as follows.
<mobile:List Runat="server" ID="List2">
<Item>
<mobile:Label runat="server" id="lblStudentName" Text='<% #Eval("StudentName") %>'>
</mobile:Label>
</Item>
</mobile:List>
in code behind
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
MTestDataContext dc = new MTestDataContext();
List2.DataSource = dc.Students;
List2.DataBind();
}
}
View 12 Replies
Jan 3, 2011
Normally I dont have the login link in the master page. But I have the labels to display the user information on top of master page once logged in and have the sign in option in content page which contains that master page. After sign in , i want to display the user information on the top of the master page without redirecting user to the same page? How can we do this?
View 5 Replies
Jun 23, 2010
I have a list of events that have been retrieved from a database a bit like this: Easter St Patrick's Day Christmas Independence Day ... I would like to make them links and when you click on the link it raises a modal popup and displays a bit more information from the database about the event. So far, I've set up the ModalPopupExtender like this on my page:
[Code]....
I thought the links might look something like this:
<asp:LinkButton ID="btnShowPopup" runat="server" OnCommand="ShowDetails" CommandArgument="Test">Event 1</asp:LinkButton></p>
[Code]....
I'm not quite sure how well this will repeat though. It looks like I'll have to have a ModalPopupExtender for every single link which doesn't sound very efficient. Am I doing this right?
View 1 Replies
Jan 28, 2011
in my db i have:
2011-01-28 12:03:46.223
when displaying on .aspx page,
<%# Eval("ModifiedDateTime") == null ? " " : Eval("ModifiedDateTime")%>
it displays on the grid like this:
12/2/2010 8:43:18 AM
how do I format it like the default format shown when I query my db?
View 1 Replies
Apr 28, 2010
I want to create a page that will dynamically change the images displayed, based on which link the user clicked to get there. For example I have different movies listed and when you click a link for one of them it displays all the images for that movie. I need it to be on one page because at the moment I have hundreds of pages and its very hard to manage. I have the images stored in BLOBS on SQL Server 2005. I can retrieve all the images for a certain category and store the Image data for each one into a list of images. What I cant do, is display the images on the page. I can display one image by using the queryString to get the image by ID, then putting the Eval code into an asp:image, but I dont know how to do it for multiple images.
View 7 Replies
Jan 21, 2010
Having trouble with a web page and connecting to SQL DB. Basically I have a form view table connected up to a SQLDataSourceControl and what I want displayed in the form is only data that has been assigned to the user that is logged on now. I have a "ViewAll" page, which lists EVERY field, regardless of who it is assigned to, but the "MyTasks" page should only retrieve the data of the current user.
I have two tables in my DB, the "Users" table, with user data (including an ID number) - this is used again in the "Tasks" table as a foreign key called "AssignTo". Therefore if user Joe Bloggs with ID number 5 logs on, whenever someone assigns a task to him, they will select number 5 in the "Task" table, as this relates to his User ID.
View 10 Replies
Mar 9, 2010
I've been asked to create a page which will provide identical information from another page. The key thing is, from my understanding, that it is not data driven it's from a txt file wich is updated. This info will need to be reflected on the page I'm going to create. how to "pull" or get the information w/o the help of database?
View 13 Replies
Feb 23, 2010
i am currently facing some problem retrieving image for display on a gridview control. the Image data type in the data table is "image". the data that is stored inside the database is in this format "<Binary data>". may i ask if it is possible tojust retrieve a image data of this format and display in the gridview? or do i need to store the image in a image folder for retrieval?
View 3 Replies
Jul 21, 2010
I'm in the process of developing a survey system. The tables / fields that are related to my question are:
[Code]....
My issues with this way were:
1) The Data Adaptors receive ALL the records from their correspondent tables. Not a good practice, I believe.
2) If, at some point, the survey had no categories, questions or choices under its child records, an error occurs when the page tries to build the Data Relation. With the work flow I had in mind for the system, this is bound to happen becuase all the Data entry pages (Add Category, Add Question, Add Choice) will be displaying the newly-created survey in a similar fashion (at which point, the survey will have no child records and so an error would occur)
View 3 Replies
Apr 20, 2010
I am using mobile list control inside that i inserted a label when i bind any dataset to that list it is not displaying any information. In msdn it is mentioned the mobile list control is equivalent of web control is datalist. The code as follows.
<mobile:List Runat="server" ID="List2">
<Item>
<mobile:Label runat="server" id="lblStudentName" Text='<% #Eval("StudentName") %>'>
</mobile:Label>
</Item>
</mobile:List>
in code behind
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
MTestDataContext dc = new MTestDataContext();
List2.DataSource = dc.Students;
List2.DataBind();
}
}
View 2 Replies
Apr 29, 2010
I have some issues about retrieveing and storing date information to my database (ms sql server 2005).My data column is a DateTime, and i have set my web.config globalization culture is set to "en-gb"
When i retrieve date from the datebase it appears as dd/MM/yy, that's fine. But i cannot insert a new date as same format?! It will only accept MM/dd/yy or yy/mm/dd.Right now i'm using this code to correct the error:
[Code]....
Is it possible to change the date format on the database or something, so i dont need to use this code?
View 11 Replies
Aug 3, 2010
I have an application called barcode available on a server on the web. The application is used to generate barcodes. The user is able to save her progress directly on her desktop, however though whenever the user try to load the saved progress. It is doesnt remotely connect to the server, instead, it defaults only the saved copy on her desktop. so for example
we have the following aspx created
barcoded.aspx. The barcoded.aspx is available on the server. the page has the following information
Name: PRT321-1 Code: 456789-1000
Label: 678900-001-001
Now, this information is saved as webpage.html. however though, when the user goes to the saved location and clicks on the saved copy, it automatically load the copy as a webpage and allow the user continue with the modification online but that is not the case. Does anyone know how to fix this problem.
View 1 Replies
Jan 19, 2011
I am making an online form (literal form) that needs to have a certain function: when the user enters a 5-digit number, the form should automatically query the MS SQL DB and retrieve information associated to that number and populate other form elements (text boxes, etc.) accordingly.
So say the # was 12345 and in the DB, the record matching 12345 has name=Fred. So, when I enter 12345 into the form textbox, the name text box should be automatically populated with Fred in it.
If this is not easily achievable, I guess a submit button beside the 5-digit number text box can do.
I am still learning my way around ASP.NET and Visual Studio 2005, however I have ample experience with HTML, CSS, JavaScript, C/C++. The ASP.NET app is to be written in C#.
View 1 Replies
Mar 8, 2011
I have issues when developing under Visual Studio 2010 and getting the favicon.ico to display. I have used favicons in production sites (sites running on Windows Server 2008, for example) and have no issues. But when I try to get it to display when testing new code under Visual Studio 2010, then I have difficulties getting it to display. Then sometimes it will display just fine with no assistance (see next paragraph). Before anyone says it...Yes, I have a file in the root directory called "favicon.ico". No, it will not display (in certain projects) when the site is run under VS2010...UNLESS I TREAT THE URL IN THE BROWSER THE SAME AS WHEN RUNNING UNDER FIDDLER2. That is to say, it will only work if I add a period character (.) in the url after the "localhost" entry [URL]. This url will cause the favicon to display every time. If I leave out the period (.), then the favion will not display -- and Fiddler2 will also not display the activity when the page is displayed/refreshed. As I said, this is a sporadic issue. I have some projects where the favicon displays fine. Then I have others where it does not...unless I put the period in the url after the locahost word. Can someone explain to me why:
(a) The period is required in the url to get Fiddler2 to "catch" the activity;
(b) Why does this same phenomenon affect the favicon as well; and,
(C) Why do some projects display the favicon fine when run under VS2010 WITHOUT the period being added?
I just do not understand what the period character in the url string is actually causing to happen and why it doesn't happen when it's missing.
View 1 Replies
Jun 29, 2010
Hey there
I have in my database emails table
and i am retrieving all the mails from that table in a string to be included in
message.To.Add()
HOW can i put it in the right format ( separated by Comma and space ) while selecting them from the database?
thank you
View 3 Replies
Mar 10, 2011
I ran into a road block and hope someone has the quick answer. Searched the forum found several solutions but none worked for me.
Here's the issue:
Got a listbox set with Multiple selection. I want to get all the Selected values of that list box to use those values to later display into an email. Tried several ways but no luck and just got frustrated.
View 7 Replies
Jan 27, 2010
I have settings.aspx page. for this page, i have two functions Page_Load and OnSubmit. In Page_Load function, iam retrieving the servername from session and updating in textbox. when i enter some other server name in the textbox, and click on sumbit, it is retrieving the old one.
View 5 Replies
Dec 6, 2010
How would I retreive the value of txtUserName in another web form?
string UserName = txtUserName.Text;
string Password = txtPassword.Text;
[Code]....
View 3 Replies