|
Hope the Article by Sadish Kumar.V here[^] in CP will help you.
Regards,
Satips.
|
|
|
|
|
Since I seemed to have stumped the experts on here as to how to go about creating a "chain" of dropdownlists, I was hoping someone could help me with a smaller issue. How would I go about raising an event for a particular dropdownlist when multiple dropdownlists are being added to a webform dynamically. I would like to identify the event using Ajax.
|
|
|
|
|
If you're using AJAX, it's trivial. Write your javascript code to pass through an Id which comes from each drop list, so, for example, when you create each one dynamically, it's selection changed event will call javascript which makes the AJAX call, stuff a variable in there to identify the drop down list in question.
What do you mean by 'chain' ???
Of course, these dynamic controls will not have viewstate unless you handle them right, but if it's all AJAX, it's all client side, which is simpler.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I need to identify that using ajax.chain in the sense multiple dropdownlists.plz help me
|
|
|
|
|
I answered this, not sure what else to say.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi, i did psot jus now now i have done the selection into the listbox. now i need to add the record in the listbox into the actor table in access database. i have done for the movice which are all textbox. i have try the same code for lsitbox but the problem is the INSERT INTO statment gt error. Please advice. thanks a lot. below is my code.
VB CODE
Partial Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
Dim Moviename
Dim Actorname
Dim Director
Dim Language
Dim Numberofdisc
Dim Studio
Dim ReleaseDate
Dim Price
Dim Quantity
Dim sql
Dim asql
Dim DBconn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("dvd_rental.mdb"))
DBconn.Open()
Moviename = txtmovieName.Text
Language = txtlanguage.Text
Numberofdisc = txtNoofDisc.Text
Studio = txtStudio.Text
ReleaseDate = txtReleaseDate.Text
Price = txtPrice.Text
Quantity = txtQuantity.Text
sql = "INSERT INTO Movie(MovieName, MovieLanguage, Numberofdisc, Studio, ReleaseDate, Price, Quantity) "
sql = sql & "VALUES('" & Moviename & "'"
sql = sql & ",'" & Language & "'"
sql = sql & ",'" & Numberofdisc & "'"
sql = sql & ",'" & Studio & "'"
sql = sql & ",'" & ReleaseDate & "'"
sql = sql & ",'" & Price & "'"
sql = sql & ",'" & Quantity & "')"
Dim dbquery As New OleDb.OleDbCommand
dbquery.CommandType = CommandType.Text
dbquery.CommandText = sql
dbquery.Connection = DBconn
dbquery.ExecuteNonQuery()
DBconn.Close()
DBconn = Nothing
Actorname = lstbxActor.Text
Director = lstbxDirector.Text
Dim DBAconn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("dvd_rental.mdb"))
DBAconn.Open()
asql = "INSERT INTO Actor(Actor Name)"
asql = asql & "VALUES('" & Actorname & "')"
Dim dbAquery As New OleDb.OleDbCommand
dbAquery.CommandType = CommandType.Text
dbAquery.CommandText = asql
dbAquery.Connection = DBAconn
dbAquery.ExecuteNonQuery()
DBAconn.Close()
DBAconn = Nothing
End Sub
Protected Sub txtActorname_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtActorname.TextChanged
End Sub
Protected Sub lstbxActor_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstbxActor.SelectedIndexChanged
End Sub
Protected Sub btnAddActor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddActor.Click
If DropDownList1.SelectedValue <> "Others" Then
lstbxActor.Items.Add(DropDownList1.SelectedValue)
ElseIf DropDownList1.SelectedValue = "Others" Then
txtActorname.Focus()
End If
End Sub
Protected Sub btnAddNewActor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddNewActor.Click
lstbxActor.Items.Add(txtActorname.Text)
End Sub
Protected Sub btnAddDirector_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddDirector.Click
If DropDownList2.SelectedValue <> "Others" Then
lstbxDirector.Items.Add(DropDownList2.SelectedValue)
ElseIf DropDownList1.SelectedValue = "Others" Then
txtDirectorname.Focus()
End If
End Sub
Protected Sub btnAddNewDirector_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddNewDirector.Click
lstbxDirector.Items.Add(txtDirectorname.Text)
End Sub
Protected Sub btnDeleteActor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDeleteActor.Click
lstbxActor.Items.Clear()
End Sub
Protected Sub btnDeleteDirector_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDeleteDirector.Click
lstbxDirector.Items.Clear()
End Sub
End Class
|
|
|
|
|
Most people are not going to read all of this code. It seems to me that you need to buy a book on web development and read it, because it seems that you're pretty lost. Are you doing this for your own benefit, or is it an assignment ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi. ya i am pretty lost abt it. i need to do a project in 3 mths but still hav a lot to do. thanks for ur help.
|
|
|
|
|
You're starting a three month assignment ? For school ? Doesn't the school provide you with reference material ? I don't mean to say that you're not welcome to ask here, you are, but you should work through a book to get some basic understanding of what is going on, and to arm yourself with the ability to ask specific and pointed questions, not broad ones that require posting the entire page here.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
ya. i also find books in library to study. no refernece material given. n i'm a slow learner thus quite difficult to do in 3 mths.
|
|
|
|
|
OK, well, all the more reason you need to buy a book and work through it. It's really your best shot. 3 months is a long time in which to write the site you've described, if you buy some good books, get a firm foundation and use this site to ask questions as you get stuck on specific things, I don't see how you should have too much trouble.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
what shortcut is used for intellisense that is even if i press one letter..
in asp.net 1.0
|
|
|
|
|
Let’s have a look at some of the VS Default keybindings in VS 2003. With no project opened the View Menu in VS 2003 has the following commands and keybindings:
Solution Explorer Ctrl+Alt+L
Class View Ctrl+Shift+C
Server Explorer Ctrl+Alt+S
Resource View Ctrl+Shift+E
Properties Window F4
Object Browser Ctrl-Alt-J
Toolbox Ctrl-Alt+X
If you start a debugging here's a subset of the commands and their keybindings under the Debug Menu:
Breakpoints Ctrl+Alt+B
Autos Ctrl+Alt+V, A
Call Stack Ctrl+Alt+C
Threads Ctrl+Alt+H
Regards,
Satips.
|
|
|
|
|
hi friends
how to check the username from database using ajax in asp.net
can u help me
regards
saravanan
|
|
|
|
|
Hope this[^] may help you.
Regards,
Satips.
|
|
|
|
|
You want to log in using AJAX ? I don't recommend that, AJAX works in javascript, so your login logic will need to live on the client, where it is easily changed.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, All
I am generating a table which contains Edit button and check box as well. I am getting problem to handle events. I don't have fix no of controls it could be any number. Is there any looping way in order to handle the events of all buttons.
If any one have any Idea regarding this. Plz help me out.
Thanks
Sapan
Spillting Headache
|
|
|
|
|
Yes definatly there should be ..... first thing is you should know how many controls you have in the page at the server try to use Page.Controls and loop through it or find any another method ..........
Then in init method declare all Event handlers for your controls
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I'm returning a dataset to a gridview control. When the gridview asp.net
control is populated from the returning dataset, if dataset is empty. The cells that are empty, in the gridview control, I would like to have the value of 0 (zero) inserted. So if no data is returned to that cell a 0 (zero) is shown.
|
|
|
|
|
First check the dataset is empty. If it is then add rows manually for the datatables. and bind that to the grid view.
|
|
|
|
|
Try This
Protected Sub ItemDB(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs)
Dim dv As DataView = CType(DataGrid1.DataSource, DataView)
Dim drv As DataRowView = CType(e.Item.DataItem, DataRowView)
If dv.Table.Rows.Count = 0 Then
'By default the Datagrid Header is shown in case there is no Data Avaiable
'So in case of No Data found
'Check the ListItemType.Header
If e.Item.ItemType = ListItemType.Header Then
Dim i As Integer = e.Item.Cells.Count
'Assign "No Search result Found" in one of the cells of DataGrid
e.Item.Cells(0).Text = "No Search Results Found"
'Remove Rest of the empty cells from Datagrid
Dim j As Integer
For j = i - 1 To 1 Step -1
e.Item.Cells.RemoveAt(j)
Next
End If
End If
End Sub '
manojchilhate
|
|
|
|
|
Hello To Everyone,
I used as follow:
dim pass as string
pass="Hemant"
TextBox1.Text = pass
i'm wrting the code Page_load...
it is working for label but not textbox
but nothing is coming in textBox....
What is problem.?
Suggest me what eRRor is ther..
Thank You.
|
|
|
|
|
did you do the following:
Page_Load
If NOT IsPostBack Then
dim pass as string
pass="Hemant"
TextBox1.Text = pass
EndIf
End Sub
|
|
|
|
|
Yes i did the following but still not working
|
|
|
|