|
I am in the process of moving my pages from asp to aspx and I ran into a snag. I have an order form that I use to place items into a Yahoo shopping cart. To do this, I have 2 forms on the old asp page each having an item. When I moved this code over to the aspx page, I found that the first form just posts back to the aspx page but the second works fine. More over, when I put a blank form before the two original forms they both work fine. It seems only the first form does not work. This is a workaround for the problem but I would like to know what is going on. Please let me know!
Regards:
For example:
<body>
<form
id="Form2"
method="post"
runat="server"
>
--- This Form Posts Back to the aspx page
<form
method=post
Id=frm02
Action="http://order.store.yahoo.com/cgi-bin/wg-order?mysite"
>
<input
Name=vwcatalog
Type="hidden"
Value=mysite
>
<input
Name=vwitem
Type="hidden"
Value=item1
>
<input
Name=vwquantity
Type="hidden"
Value=0
>
<input
Class="submitbutton"
Value="submit"
Type="image"
src="http://mysite.org/images/CmdButton-AddMeToThisEvent-2F8DBE.gif"
id="btn1"
width="190"
>
</form>
----This form works fine ---
<form
method=post
Id=frm03
Action="http://order.store.yahoo.com/cgi-bin/wg-order?mysite"
>
<input
Name=vwcatalog
Type="hidden"
Value=mysite
>
<input
Name=vwitem
Type="hidden"
Value=item2
>
<input
Name=vwquantity
Type="hidden"
Value=0
>
<input
Class="submitbutton"
Value="submit"
Type="image"
src="http://mysite.org/images/CmdButton-AddMeToThisEvent-2F8DBE.gif"
id="btn2"
width="190"
>
</form>
</form>
</body>
Steve
|
|
|
|
|
ASP.NET works by creating it's own form, you need to rewrite this to not use two forms.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for the reply!!
Is there any reason you can think of for why the complier does not put up a fuss when you add form tags or that the page seams to work when you put a blank form in frount of the other two?
Cheers:
Steve
|
|
|
|
|
I guess it's been left alone in case you have a valid reason for doing so. But anything that is in a form that you define will not work with ASP.NET, because ASP.NET relies on the form it creates being posted back.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm trying to move the mouse over a button with code but I can't.
I found this property "Control.MousePosition" but I can't do it.
Someone can help me?
Thanks
|
|
|
|
|
use the following API:
Public Declare Function SetCursorPos Lib "user32" Alias "SetCursorPos" (ByVal x As Long, ByVal y As Long) As Long
|
|
|
|
|
Thanks a lot, it works well!!
|
|
|
|
|
Also try setting the Cursor.Position property.
|
|
|
|
|
I would like to know if there is anyway to embed a thumbnail image inside an image file if the file doesn't alrealdy contain it's thumbnail. Most image files already have the embedded thumbnail so you can use Image.GetThumbnailImage Method, which in case of large files reduces the amount of time necessary to read the thumbnail, I would like to embed thumbnails for the images that don't contain it for (faster) future access.
Is there a way? Thanks!
|
|
|
|
|
Kramer_1982 wrote:
Most image files already have the embedded thumbnail
Really? Not in any documentation that I've seen on any image file formats.
Image.GetThumbnailImage() returns the thumbnail image of the Image object, not the image in the Image file. If there is no thumbnail generated for it yet, it will read the Image file generate the thumbnail image at the requested size, save it into the Image object, then return that to the caller.
The next time you request the thumbnail image, the cached version in the Image object will be returned to the caller. When you save the Image object back to a file, the thumbnail is not written to the file with it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 15:11 Saturday 10th September, 2005
|
|
|
|
|
Yes, you're right (well not quite, the msdn help for Image.GetThumbnailImage() says that it looks for an embedded thumbnail first... I guess), but I think I didn't put the right question. If you save a file(TIFF or JPEG) in Photoshop for example, the file is saved along with it's thumbnail (in the actual file, not as a thumbs.db or anything like that... there is a checkbox in the Photoshop Save dialog). I want to know if I can do that with a VB application. Maybe saving the graphics does just that, but I'm not sure (you just said that it doesn't so...).
I hope this makes more sense. I tried to get a thumbnail with DrawImage(...) and it takes about 3-7 seconds for a 4000x4000 TIFF image, while using GetThumbnailImage() takes only 0.4 seconds for the same image (the image was generated in Photoshop with the Thumbnail checkbox checked).
Hope I was explicit enough, thanks for the prompt answer.
|
|
|
|
|
The thumbnail is an extension to the JPEG format. I can't find ANY documentation that says the Image class can save that extension.
All you can do is try to get the thumbnail, then save the Image. Load into Photoshop and see if the thumbnail is there or not.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have the following structure:
This is my object
Public Structure structTransoverride
Public Account_Name As String
Public PolicyNumber As String
Public TransCodeOrig As String
Public TransEffDate As String
Public Override_Action As String
Public Override_New_Renewal As String
Public Override_Transaction_Code As String
Public ModifiedDate As String
Public ModifiedUID As String
Public Plan_Year As String
Public RowNum As Integer
End Structure
I need to initialize it? And set the values in the below subroutine. How do I do this?
I need to initialize it? And set the values in the below subroutine. How do I do this?
NOTE==> It cannot be declared in Sub highLightRow it since it will have to be passed in
the sub routine below called doModify()
objTransoverride.RowNum = hit.Row?
objTransoverride.Account_Name = Convert.ToString(grd.Item(RowNum, 0))
Private Sub highLightRow(ByVal sender As Object, ByVal e As MouseEventArgs)
Dim pt = New Point(e.X, e.Y)
Dim grd As DataGrid = CType(sender, DataGrid)
Dim hit As DataGrid.HitTestInfo = grd.HitTest(pt)
If hit.Type = grd.HitTestType.Cell Then
grd.CurrentCell = New DataGridCell(hit.Row, hit.Column)
objTransoverride.RowNum = hit.Row
grd.Select(objTransoverride.RowNum)
objTransoverride.Account_Name = Convert.ToString(grd.Item(objTransoverride.RowNum, 0))
objTransoverride.PolicyNumber = Convert.ToString(grd.Item(objTransoverride.RowNum, 1))
objTransoverride.TransCodeOrig = Convert.ToString(grd.Item(objTransoverride.RowNum, 2))
objTransoverride.TransEffDate = Convert.ToString(grd.Item(objTransoverride.RowNum, 3))
objTransoverride.Override_Action = Convert.ToString(grd.Item(objTransoverride.RowNum, 4))
objTransoverride.Override_New_Renewal = Convert.ToString(grd.Item(objTransoverride.RowNum, 5))
objTransoverride.Override_Transaction_Code = Convert.ToString(grd.Item(objTransoverride.RowNum, 6))
objTransoverride.ModifiedUID = Convert.ToString(grd.Item(objTransoverride.RowNum, 7))
objTransoverride.ModifiedDate = Convert.ToString(grd.Item(objTransoverride.RowNum, 8))
objTransoverride.Plan_Year = Convert.ToString(grd.Item(objTransoverride.RowNum, 9))
End If
End Sub
Public Sub DoModify()
Dim dTable As DataTable = Me.DataGrid1.DataSource
Dim bm As BindingManagerBase = Me.DataGrid1.BindingContext(Me.DataGrid1.DataSource, Me.DataGrid1.DataMember)
Dim dRow As DataRow = CType(bm.Current, DataRowView).Row
Me.lbNumRec.Text = Me.DsTransOverride1.Tables(0).Rows.Count.ToString()
Dim cEditTransOverride As New EditTransOverride
' object being passed
**********************************************
cEditTransOverride.ShowDialog(objTransoverride)
***********************************************
cEditTransOverride.Dispose()
Me.SqlDataAdapter1.Update(Me.DsTransOverride1)
Me.DsTransOverride1.Tables(0).Clear()
Me.SqlDataAdapter1.Fill(Me.DsTransOverride1)
Me.DataGrid1.Refresh()
End Sub
Where do I instantiate or initialize the object and to I make it public?
I will need to do a XXXXX objTransoverride As new structTransoverride ?
I will have this in my dialog form?
'Form overrides dispose to clean up the component list.
Public Overloads Sub ShowDialog(ByRef objTransoverride As structTransoverride)
'
' Do All the work that you want to i.e. the one that you have written in the Load
'
'
MyBase.ShowDialog()
End Sub
|
|
|
|
|
I HAVE SPEND TWO WEEKS ON MY YEAR PROJECT ONLY TO FIND OUT THAT I WAS DOING THE RIGHT THING BUT DID NOT USE ARRAY TO PASS MY PARAMETERS.CAN U HELP ME OUT? PLEASE.
I NEED TO OPEN A FILE USING ARRAYS,DISPLAY THE DATA ON THE CONSOLE AND THATS JUST IT.THE REST I'LL DO IT MYSELF 'CAUSE I DON'T WANT TO STRESS U.
HOPE TO HEAR FROM U SOON.
PLS
Sma
|
|
|
|
|
STOP SHOUTING! Or at least get your caps lock key fixed.
DJSMA wrote:
I NEED TO OPEN A FILE USING ARRAYS,DISPLAY THE DATA ON THE CONSOLE AND THATS JUST IT.
That is not enough information. I don't know what you mean by "open a file using arrays"? Do you mean you want to read the contents of a file into an array of some kind? Do you mean you have multiple files that you need to open and the filenames are stored in an array?
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
I am building a program in vb.net and I am at final stage of developing reports. My problem is my application is multi-lingual having english and Arabic (right to left ) language. What I want is to build the dynamic reports which can me changed from (left to right) to (right to left) is there any reporting tool which supports this along with dynamic field ?
Crystal do not support such things
|
|
|
|
|
Hi,
Cane somebody help me ..
I've a dataset that has some updated rows and some new inserted rows. Could I use the single update method of data adapter to insert as well update my data ???
|
|
|
|
|
Im still new to vb.NET but I believe that calling the datasets update method will automatically call all required update/insert/delete sql commands to make the database match the changes you have made in the relevant table.
|
|
|
|
|
I have a web site Built with .net. I am geting complaints that the page is scrambles up on mac's I have data grids and such running on the site. HELP!!!!
|
|
|
|
|
One of the projects that has just gone live put a few weeks of the project plan aside for fixing up cross browser problems. We also bought a MacMini for testing purposes.
You need to find out what the problems are. A user report of "the page scrambles up on macs" is not sufficient. And you telling us that "I have data grids and such" is equally vague. You have to see how it "scrambles up" and create some html pages that show the error and an equivalent that shows the result you want. If you cannot see how to get from one to the other you can post a sample and say something like "this HTML works fine in IE but not on Opera, can you tell me where I'm going wrong?"
You can then apply that knowledge to your code. You may have to have lots of conditional statement in your web application to render things differently dependent on the browser it will be serving the page to.
Hopefully this will help you define your problem better so that you can receive the help you need.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucious
|
|
|
|
|
Thanks Colin I will check into that.
|
|
|
|
|
I need an example using the IDescriptiveContext.
I need an example of converting string to Color Object while it has been saved to string before
militiaware
|
|
|
|
|
How to make a VB.NET program run at startup windows.
militiaware
|
|
|
|
|
The best approach is to create the app as a Windows Service. You can find articles on CP that describe creating services, and the NET help has a basic walkthrough as well.
|
|
|
|
|
For Windows Startup, this would be a Windows Service application.
For when a User Login occurs, you could run a normal application from the Registry Run key.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|