Click here to Skip to main content
15,898,134 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Adding Textbox dynamically when the value of Drop down list changes Pin
N a v a n e e t h1-Feb-09 13:20
N a v a n e e t h1-Feb-09 13:20 
GeneralRe: Adding Textbox dynamically when the value of Drop down list changes Pin
fasttoshiba1-Feb-09 14:22
fasttoshiba1-Feb-09 14:22 
GeneralRe: Adding Textbox dynamically when the value of Drop down list changes Pin
N a v a n e e t h1-Feb-09 14:26
N a v a n e e t h1-Feb-09 14:26 
QuestionHow do you pass values to a datasource Pin
AndyASPVB1-Feb-09 10:39
AndyASPVB1-Feb-09 10:39 
AnswerRe: How do you pass values to a datasource Pin
sana171-Feb-09 22:20
sana171-Feb-09 22:20 
GeneralRe: How do you pass values to a datasource Pin
AndyASPVB2-Feb-09 7:55
AndyASPVB2-Feb-09 7:55 
GeneralRe: How do you pass values to a datasource Pin
sana173-Feb-09 1:06
sana173-Feb-09 1:06 
GeneralRe: How do you pass values to a datasource Pin
AndyASPVB3-Feb-09 8:51
AndyASPVB3-Feb-09 8:51 
Sorry, I don't what's a matter with me on something that should be a breeze in the park, but I can't this work. I am not getting any error message, but no value is being passed.

So, I started again and tried to keep it simple. I have one dropdownlist and one button. Below is the markup followed by the VB Code behind:

<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="AccessDataSource1" DataTextField="LastName"
DataValueField="LastName">
</asp:DropDownList>

<asp:AccessDataSource ID="AccessDataSource1" runat="server"
DataFile="~/Northwind.mdb" SelectCommand="SELECT [LastName] FROM [Employees]">
</asp:AccessDataSource>
<asp:AccessDataSource ID="AccessDataSource2" runat="server"
DataFile="~/Northwind.mdb"
UpdateCommand="UPDATE [Employees] SET [NotActive] = ? WHERE [EmployeeID] = @[EmployeeID]">
</asp:AccessDataSource>
<asp:Button ID="Button1" runat="server" Text="Click Me" />

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
AccessDataSource2.UpdateParameters.Add("NotActive", "YES")
AccessDataSource2.UpdateParameters.Add("EmployeeID", DropDownList1.SelectedValue)
End Sub

Can you please look through, correct and point out to me where I am going wrong!

Thanks
GeneralRe: How do you pass values to a datasource Pin
sana174-Feb-09 1:34
sana174-Feb-09 1:34 
QuestionHow do you add childnodes to a treeview? Pin
AndyASPVB1-Feb-09 10:35
AndyASPVB1-Feb-09 10:35 
QuestionImage not been displayed from SQL Pin
Anita_Kamat_inds1-Feb-09 4:38
Anita_Kamat_inds1-Feb-09 4:38 
AnswerRe: Image not been displayed from SQL Pin
Colin Angus Mackay1-Feb-09 12:43
Colin Angus Mackay1-Feb-09 12:43 
GeneralRe: Image not been displayed from SQL Pin
vaghelabhavesh1-Feb-09 13:02
vaghelabhavesh1-Feb-09 13:02 
GeneralRe: Image not been displayed from SQL Pin
Colin Angus Mackay1-Feb-09 13:04
Colin Angus Mackay1-Feb-09 13:04 
GeneralRe: Image not been displayed from SQL Pin
Anita_Kamat_inds1-Feb-09 16:19
Anita_Kamat_inds1-Feb-09 16:19 
GeneralRe: Image not been displayed from SQL Pin
Colin Angus Mackay2-Feb-09 8:43
Colin Angus Mackay2-Feb-09 8:43 
GeneralRe: Image not been displayed from SQL Pin
Anita_Kamat_inds2-Feb-09 9:02
Anita_Kamat_inds2-Feb-09 9:02 
GeneralRe: Image not been displayed from SQL Pin
Colin Angus Mackay2-Feb-09 9:53
Colin Angus Mackay2-Feb-09 9:53 
GeneralRe: Image not been displayed from SQL Pin
Anita_Kamat_inds2-Feb-09 10:01
Anita_Kamat_inds2-Feb-09 10:01 
GeneralRe: Image not been displayed from SQL Pin
Anita_Kamat_inds1-Feb-09 16:06
Anita_Kamat_inds1-Feb-09 16:06 
GeneralRe: Image not been displayed from SQL Pin
Anita_Kamat_inds1-Feb-09 16:08
Anita_Kamat_inds1-Feb-09 16:08 
QuestionGridview binding to both base n derived classes Pin
dotnet.coder1-Feb-09 2:59
dotnet.coder1-Feb-09 2:59 
AnswerRe: Gridview binding to both base n derived classes Pin
Manas Bhardwaj1-Feb-09 4:01
professionalManas Bhardwaj1-Feb-09 4:01 
QuestionLabel and Absolute Positioning Pin
swjam1-Feb-09 1:15
swjam1-Feb-09 1:15 
QuestionAutocomplete AJAX Pin
CrimeanTurtle20081-Feb-09 0:23
CrimeanTurtle20081-Feb-09 0:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.