|
|
Hi all:
I have a comunications problem, and hope someone can help.
I have a page with a formview, [myForm.fvSpecies] in it, with the Insert method bound to a class method [clsSpecies.Insert], which itself calls an method in another class, [clsDBUpdate.Insert] that holds SQL.
This all works find, and on completion, [clsUpdate.Insert] (automatically behind-the-scene) raises an [ItemInserted] event that is trapped and handled by my [myForm.fvSpecies], as expected.
However, the problem occurs when I programmatically decide not to do the insert, eg if the user is not authorised.
AFAICS, the ItemInserted event arguments are identical, whether the actual insert happened or not (which is fair enough as the method [clsSpecies.Insert] completes, whether it calls [clsDBUpdate.Insert] and executes the SQL or not).
But what i want to do is to inform fvSpecies whether the update really occured or not.
I have tried to update the event-arguments of ItemInserted, but I cannot work out how, and I have tried to raise an event myself, but i cannot trap it: so please can anyone explain how my [clsSpecies.Insert] method can communicate with fvSpecies formview, via the ItemUpdated method or some other way, so I can be in control of the parameters and set a message or a code or something, myself, so the [myForm.fvSpecies] (or containing form myForm) knows what happened?
There must be a simple way to be in control of this communication, either by piggy-backing the automatic ItemInserted event or raising another event myself: but I cannot figure it out or find it.
Many thanks -
aitch
--x---
|
|
|
|
|
hello everybody iam a fresher,
how to get radio button in datagrid through property builder.
srinivas
|
|
|
|
|
There is a way for doing this ? I don't know because there is no way for doing this you can just use itemtemplate and put a radiobutton into this template and bind it whereever you want to...
Have a nice day..
|
|
|
|
|
i think u want to access the radiobutton through code..
if yes
then u have to find the radiobutton control in the datagrid row and then do whatever u want with it
|
|
|
|
|
I am getting problem with the IIS. when we right click properties of the virtual folder and in the configuration section to add new .dll in the execute section.
The OK button is getting disabled.
If anybody who worked. pls help me out.
Thanks in advance,
kartik
|
|
|
|
|
A potentially dangerous Request.Form value was detected from the client (myTextarea=<...").
I currently using ASP.NET
in my form contain textarea, when i type the normal text it work ok, but i type like this " " or something else in HTML i got error above, please help me.
Socheat
|
|
|
|
|
Add the line: <pages validateRequest="false" /> inside the <system.web> section.
6-shooter
|
|
|
|
|
If you set validateRequest = false then your request validation is not done. Rather, If you are using any special character which is passing from url, try to convert those special character into some form of combination, and when done convert back into special character.
Regards
Mahesh
|
|
|
|
|
Socheat.Net wrote: A potentially dangerous Request.Form value was detected from the client (myTextarea=<...")
Are you using "<" character. ASP.NET defaultly will not allow to postback with that characters. Add the ValidateRequest="false" in the @Page directive.
|
|
|
|
|
Thanks, i'll try my best.
Socheat
|
|
|
|
|
Hi,
You may solve this by setting the Page attribue ValidateRequest=false
Have a look at this[^] article for better understanding.
Regards,
Jay
|
|
|
|
|
Thanks, i found it very nice.
Socheat
|
|
|
|
|
Hi i displayed my datas in my form...,
When i give print option now those datas want to come in separate form and want to ask print like...,
See this option will be in gmail a/c...,
In our msg, when we click print option it will open separate from and those datas will be print...,
How to do like that?,
Plz hlp me,
Advance thanks...,
Magi
|
|
|
|
|
Hi friends,
I am working on a very large application in my company. It has very good framework implemented by the architects and designers.
In that framework I have needed to modify a class in one .cs file in one class library. I added 3 functions in that class. I am using existing typed datasets in those functions. From those datasets I have to filter data and return the resultant datacollection from the functions.
I have 2 approach to accomplish this.
1. To use Select() function on the table in the dataset and pass query to the function and get the filtered data.
2. To loop through all the rows in the table in the dataset and create collection of macthing rows and then return that collection from the function.
I need to know which approach is better and also is there any process which can be employed to check which approach from above two takes more time.
I have tried by putting datetime variables around the function calling and checking the difference between them but they show the same time with no difference at all.
So please can anyone guid me which is the better approach and how to measure the function performance.
Thank you all in advance.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
I think Select function is preferable than second option .
there are many ways to check performance of the applicatin Check for Parformance Counter class in the System.Diagnostics namespace
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... "
|
|
|
|
|
Hi Sandeep,
Thank you very much for the reply and help.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
I am having one imcomplete projct in vb 6.0 and now i want to upgrade that project to Dotnet 2005 and then want to Modify this project.Is it possible??? if it is then how,pls help me asap.
Thanks!!!
GIRISH
|
|
|
|
|
VB6 and VB.NET are very different. The IDE will attempt to move your project, but odds are low that it will be much of a success.
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 )
|
|
|
|
|
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
|
|
|
|