I have a web page which has a DropDownList & image with links... The issue is when SelectedIndex of DropDownList is changed the image should change according to some condition and also href & link text should change accordingly.. some thing like
say :
I have 3 items in DropDownList : 1> Google 2>Yahoo 3> Orkut
Image1(Google Logo) Visit Google(Text link)
when user selects Yahoo : The Image1 should change( to Yahoo Logo) and Text should change( to Visit Yahoo)
i have an asp.net application, i want to incorporate init the functionality of having the user select from a dropdown list a name, select multiple files (images), upload those images to a physical path on a server, save the image paths to a database on the said server.
If the user fails to select a name from the dropdown list then the user would receive an alert message stating that a name must be selected.
In addition once the files have been successfully saved to the server's physical location, then and only then should the path be uploaded to a table in the database.
I have two dropdown linked with sqldatasources.When I select item in ddl1 then on the basis of selection ddl2 is being loaded.Is there any possiblity that if I select ddl2 then ddl1 will also load on the basis of selection?
I am a complete newcomer to ASP.NET. However in the few weeks I have been playing with it I have got pretty far and have mastered things like stored procedures, gridviews, formviews and templates.I have a dropdown box which is populated from SQLDataSource1
I have a second dropdown box which is populated from SQLDataSource2, but i need the query feeding this to be dependent on what was selected in the first dropdown box. I assumed it would simply be a case of modifying the select statement on SQLDataSource2 using the SelectedIndexChanged event on the first DropDownList to update the second SQL source, but I cannot work out for the life of me how to do it. Pretty much all of the code I have is ASP.
can i do this purely in ASP rather than using VB behind the scenes or do I need to use VB? I am pretty comfortable with vb.net but one of the other issues I have is referencing an ASP object from VB... so for instance if I had a text box in ASP, how can I read or change the properties of this object from VB?
i have a dropdown with month names if the user has data for the month tht is selected then gridview displays the rows with day nos as per the month but if the gridview has no data for the same the dropdown or gridview via some event should call a insert procedure to insert data into the table for tht month with daynos ad rebind the gridview witht the rows just created
I am new to MVC, I have a form in which selection of one dropdown should reload another dropdown. On selection of the dropdown, I use a jquery post to get the data and my viewstate is reloaded with new data, but I am not sure how to set the newly loaded viewdata to load the dropdown again.
I need getting a drop down list selection to populate a calendar. The user selects a vehicle from the dropdownlist and based on that selection, the calendar needs to populate a link with drivers names on whatever days the vehicle is rented out for.
I wanna set a default value in dropdown list when i change in list.....e.g.
I have a dropdown which i have placed in Gridview templates and there is another dropdown jst above that grid....i want...when i change in above dropdown and select a value from that...then that value should be apply in below gridview's dropdown...
As i am selecting 'A' then Gridview's All Dropdowns default value should set 'A'
I'm trying to make a order form where once the user selects an item from the drop down list, the label will automatically be populated with the user's selection.suppose user select item from drop down then label populate rate for that itemve me a sample example..
I am trying to display results based on both dropdown list selection.If a user selects Jan from 1st ddl and 2013 from 2ns ddl then results of Jan 2013 will be displayed to the user,everything works fine,I wanted to confirm the query that I have used is correct or not.
Store Procedure
Create proc usp_monthwisedata @month int, @year int
[Code].....
My concerns are:
1.Is the way of writing the Sp is correct to achieve the result.
2.Is it correct to set the onselectedindexchanged of both the ddls to 1 method i.e onselectedindexchanged="DropDownList1_SelectedIndexChanged"
Now, based on user selection say, 'Car', I want to display Help text associated with selection on page. Help text description - 1000 characters. Now, how do I fetch Help Text Description from? should I store in Session scope or Application Scope or fetch from Database based on drop down selection.
I have a gridview with 50 rows. I want to display the rows according to the selection in dropdownlist. Say for ex - In my dropdown i have items 10,20,30,40,50. If i select 20 grid should display only 20 rows.
I have two dropdowns in the footertemplate of my gridview inside a usercontrol.
I also have a button "btnADD" inside the footer template. I am using the footertemplate to add a new row to the grid.
What do I do to validate on Button_click event for 'btnAdd' if a value is selected in the dropdown other than "select.." which I dynamically add in rowdatabound event?
I have this javascript function that I wanted to implement, but it gets called in the Page_load event rather than the button click event and gives an error.
The javascript function that I need to call is this: ( I created a method to return a string to use it in regards to RegisterClientScriptBlock, but do not know exactly how to use it)
I'm having trouble figuring out how to display a gridview based on the selection of a drop down list. I manually entered the drop down list items, but in the configure/choose data source I don't understand how you make a relationship between each list item and the corresponding database table you want to show.
I would like to alter the query that is run, depending on the selection made by the user in a drop down list on the same page. Would this best be done using a partial page update (AJAX)? Ideally it would be great to have the textbox result change quickly once the drop-down list value has changed, without a full page postback. I would like to change the SQL query to a completely different query if the user selects an option different to the default (page_load value) in the drop-down list. I would then like the newly retrieved result to be displayed in the textbox as before.
I have a Gridview with a parameterized SQLdatasource. I want the Gridview to be filter when the a selection is made from the dropdown list Here is what I have. I am missing something.
<asp:SqlDataSource ID="SqlDSAlbums" runat="server" ConnectionString="<%$ ConnectionStrings:Default %>" SelectCommand="SELECT Album.Album, genre.Genre, Band.Band, Album.year, Album.AlbumUID FROM Album INNER JOIN Band ON Album.BandUID = Band.BandUID LEFT OUTER JOIN genre ON Album.GenreUID = genre.GenreUID WHERE (genre.Genre = @Genre) OR (genre.Genre < 'ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ') ORDER BY genre.Genre, Band.Band" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"> <SelectParameters> <asp:ControlParameter ControlID="ddlGenre" Name="Genre" PropertyName="SelectedValue" /> </SelectParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="SqlDSGenre" runat="server" ConnectionString="<%$ ConnectionStrings:Default %>" SelectCommand="SELECT Genre, GenreUID FROM genre Order by Genre"></asp:SqlDataSource> Select a Genre <asp:DropDownList ID="ddlGenre" runat="server" DataSourceID="SqlDSGenre" DataTextField="Genre" DataValueField="Genre" AppendDataBoundItems="True" AutoPostBack="True"> </asp:DropDownList> <asp:GridView ID="gvAlbum" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDSAlbums"> <Columns> <asp:BoundField DataField="Album" HeaderText="Album" SortExpression="Album" /> <asp:BoundField DataField="Genre" HeaderText="Genre" SortExpression="Genre" /> <asp:BoundField DataField="Band" HeaderText="Band" SortExpression="Band" /> <asp:BoundField DataField="year" HeaderText="Year" SortExpression="year" /> <asp:TemplateField HeaderText="Comments"> <ItemTemplate> <asp:HyperLink ID="hlToComments" HeaderText="Comments" runat="server" NavigateUrl='<%# String.Format("ViewComments.aspx?AlbumUID={0}", Eval("AlbumUID")) %>' Text="Click Here" /> </ItemTemplate> </asp:TemplateField>
I have the following code, i add code for required validator, but when you make selection from dropdown to create the table, the page generates an error. Should the logic be somewhere else to add it to the table? i mean, dont they have to be there so when you submit the form, it fires the validation?
i want to see the sales in the grid view based on the month selected from drop down list. Ex: when I select June 2010 from the ddl box, the sales for that month are correctly displayed in the grid view. I go to page 4 to look at some sales there and then switch the month to August 2010 to see sales for that month instead. Here is the problem. When I switch the month, it show August 2010 sales, but stays in page 4 instead of going back/resetting back to page 1 of August 2010 sales.
How do I reset the grid view page back to the first page of August 2010 sales?
I am fairly new to ASP. If I have missed an imp. detail in this post, let me know and I will get that info. out there.
Here i am using dropdown that will retrive from database when i will select an item from dropdownlist then item rate display on the selection of dropdown item name.
I am building a custom control that mimics a dropdownlist with my own custom items in it. I'd like to figure out how after selecting something, the text changes to what was selected.
I can do it with javascript but looking at the html source of a dropdownlist, there is no javascript there to modify the textbox/label.
in index page I have dropdown list.. I need to get the values from database based on this dropdown list and need to show that values in the grid in same page index page..
now i am using listview control with datapaging its working fine at the page load binding the data. when iam selecting in the dropdown value according to that value i want to bind listview and datapaging how?