|
hi, i have put up a post before abt my project. i am able to run my project but now i ahve a problem because all my code is in .aspx now i need to put the code into aspx.vb i try to double click the submit button but it brings me to .aspx n there is a i would want to know how to transfer my code into the aspx.vb below is my code in .aspx thanks a lot in advance.
<script runat="server">
Protected Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs)
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 = Request.Form("txtmovieName")
Actorname = Request.Form("txtActorname")
Director = Request.Form("txtDirector")
Language = Request.Form("txtLanguage")
Numberofdisc = Request.Form("txtNoofdisc")
Studio = Request.Form("txtStudio")
ReleaseDate = Request.Form("txtReleaseDate")
Price = Request.Form("txtPrice")
Quantity = Request.Form("txtQuantity")
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 & "')"
'asql = "INSERT INTO Actor(Actor Name)VALUES('" & Actorname & "')"
'Dim dbq As New OleDb.OleDbCommand
'dbq.CommandType = CommandType.Text
'dbq.CommandText = asql
'dbq.Connection = DBconn
'dbq.ExecuteNonQuery()
Dim dbquery As New OleDb.OleDbCommand
dbquery.CommandType = CommandType.Text
dbquery.CommandText = sql
dbquery.Connection = DBconn
dbquery.ExecuteNonQuery()
DBconn.Close()
DBconn = Nothing
End Sub
<title>WebAdd.aspx
function Table1_onclick() {
}
function Text1_onclick() {
}
<asp:label id="AddNewDvd" runat="server" width="240px" designtimedragdrop="8" font-bold="True" font-size="14pt" font-names="Times New Roman">Add new DVD Record | | | |
<asp:label id="Moviename" runat="server" width="112px" font-size="14pt">DVD Title: |
<asp:textbox id="txtmovieName" runat="server"> |
<asp:label id="Actor" runat="server" width="112px" font-size="14pt">Actor: |
<asp:dropdownlist id="DropDownList1" runat="server" width="132px" enabletheming="True">
<asp:listitem>
<asp:button id="btnAddNew" runat="server" text="Add New">
<asp:textbox id="txtActorname" runat="server">
<asp:button id="btnAdd" runat="server" text="Add" width="72px">
<asp:listbox id="ListBox1" runat="server" height="94px" width="166px">
<asp:button id="btnDelete" runat="server" text="Delete">
|
<asp:label id="Director" runat="server" width="112px" font-size="14pt">Director: |
<asp:dropdownlist id="DropDownList2" runat="server" width="138px">
<asp:button id="btnAddNewD" runat="server" text="Add New">
<asp:textbox id="txtDirector" runat="server">
<asp:button id="btnAddD" runat="server" text="Add">
<asp:listbox id="ListBox2" runat="server" height="102px" width="168px">
<asp:button id="btnDeleteD" runat="server" text="Delete">
| <asp:label id="language" runat="server" font-size="14pt" width="112px">Language: | <asp:textbox id="txtlanguage" runat="server"> | <asp:label id="Numberofdisc" runat="server" font-size="14pt" width="145px">Number of Disc: | <asp:textbox id="txtNoofDisc" runat="server"> |
<asp:label id="Studio" runat="server" width="112px" font-size="14pt">Studio: |
<asp:textbox id="txtStudio" runat="server"> | <asp:label id="ReleaseDate" runat="server" font-size="14pt" width="112px">Release Date: | <asp:calendar id="Calendar1" runat="server">
|
<asp:label id="Price" runat="server" width="112px" font-size="14pt">Price: |
<asp:textbox id="txtPrice" runat="server"> |
<asp:label id="Quantity" runat="server" width="112px" font-size="14pt">Quantity: |
<asp:textbox id="txtQuantity" runat="server"> | | |
<asp:button id="Submit" runat="server" text="Submit"> | |
ling
|
|
|
|
|
Add the CodeFile = "YourFile.aspx.vb" in the @Page directive. Now copy your code into the YourFile.aspx.vb file.
|
|
|
|
|
Add a new Item selecting "place code in seperate file" and then copy the whole HTML tag part in to the aspx file, double click the button and their place the script part.
Mohan Kumar
|
|
|
|
|
Hello!
I have a websote that uses Adobe pro to view pdf documents. But now when I move it into my production enviroment, I get this error.
"Cannot create ActiveX component".
I'm guessing it's the adobe ActiveX, just not sure which one, or how should I install on the web server, or does it have to go on the client?
TIA!
Rudy
|
|
|
|
|
rudemusik wrote: I have a websote that uses Adobe pro to view pdf documents.
Are you viewing PDF or creating PDF??
|
|
|
|
|
Hi,
I am having problem with this dynamic table creation with textbox and button in it.
Firstly let me explain why I need to create table dynamically. There will be cases sending in by the user compalaining some problem with the product, then internally the manager will assign this cases to the people under him/her. Before assigning it, the manager will type in some task that advise the employee what to do with this case. There can be one, two, three to infinity tasks to be added depend on the manager's preference.
So whenever the manager click 'Add Task', one row of textbox and button will be created (btw, the button is to delete the task if the manager don't wants it), if he/she clicks again, another row will be added.
The problem is I save all this dynamic table rows in a session so that it won't go away if any postback or refresh happens. It works well untill I need to open another case, the other case will read whether there is a session and use the session, but too bad the session belongs to the previous case.
I'd tried putting the selected case id into a session, so it will remove the task session when the case id selected is different from the session id. This works well until I need to add more task to the present ones.
I'm getting very confuse on the best way to do it as my codes are getting very messy. I would like to seek for some expert advise on the right way to deal with this dynamic table.
Thanks in advance.
J Liang
|
|
|
|
|
Use a hashtable keyed with the case ID
only two letters away from being an asset
|
|
|
|
|
If I have an image field in my gridview is there a way to tie it to a link so that it is clickable?
I know there is the imagebutton column, but I don't see a way of populating the image from the database like I am doing with the image column.
For example, I have a database with a column called "image" which has the relative path on my webserver to the image. Right now I am just binding the image column to the path for its imageurl field and I get the correct image to show. The problem is that I see no way of making it a link so that people can click on it. Alternately, I see no way of binding the imagebutton field to the database "image" column. Maybe I am just overlooking it?
|
|
|
|
|
Use a template column and wrap the image in a hyperlink control.
only two letters away from being an asset
|
|
|
|
|
I see the option to add a TemplateField, but I am not sure how to do the wrapping.
|
|
|
|
|
this[^]will help you in Wrapping in the template field.
Regards,
Satips.
|
|
|
|
|
The article you reference is completely off the topic and is no help at all in the problem at hand.
only two letters away from being an asset
|
|
|
|
|
It means,
<a><img></img></a> I have mentioned the concept only.
Use this format in your TemplateColumn
Regards,
Jay
|
|
|
|
|
That doesn't seem to work because it adds the formatting inside the <img src=""> tag. So if I used your example it would do
<img src="<a><img>images/imageName.jpg</img></a>/>"
|
|
|
|
|
Ok I figured it out. Thanks for getting me thinking straight.
I had to do it from a hyperlink field
I changed the DataTextField to my image column in the database and then I used the DataTextFormatString
|
|
|
|
|
I want to redesign my shopping cart to use XML. I know XML concepts and structure, but I've never implemented it in anything useful before. Are there any examples out there where they use it for shopping cart?
|
|
|
|
|
|
I tried google. I have yet to find any good results.
|
|
|
|
|
I'd ask why you feel you need to change ? Doesn't it work as it is ? Does XML offer you something specific that you'd like ? Or did you just decide that XML is 'cooler' ?
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 )
|
|
|
|
|
It has some bugs and rather than patching them I figured I could redesign it with some cool technology.
|
|
|
|
|
I don't understand the line of code below. I've done searches on CTYPE but did not find anything helpful. What is the word "String" in parenthesis, how is the following code used?
strGoodPassword = CType(objCommand.ExecuteScalar, String)
Thank you in advance for your help.
|
|
|
|
|
|
I'm wondering what the maximum value is for the 'Duration' attribute in the OutputCache Directive.
I have some aspx pages for the only reason that they have master pages to form a universal layout throughout the site, other then that they are completely static and i would like to cache them for as long as possible so they dont have to execute on each request.
Any idea?
Thanks in advanced
|
|
|
|
|
Hi Yona low
In the documentation givin by microsoft, Value for the Duration attribute in the outputcache directive is not limited, so you can use
any value.
|
|
|
|
|