|
Its usually good practice to have a primary key for your tables, I would def put one in
|
|
|
|
|
Hi
I have created a website which has a number of buttons on it which allow users to add items to there basket, they then click on an AJAX watermarked textbox to set focus before using a keyboard wedge scanner to scan there staff ID card, this causes a postback and validates the user - all works perfectly. - This is all done on a touch screen with a keyboard wedge scanner, the users will have no access to a keyboard.
My problem is caused if the user attempts to scan their card before clicking on the watermarked textbox. This then forces a postback to the server and will fire one of the button controls at random (I presume it fires a control which it thinks has got the focus.)
I have tried setting focus to a textbox automatically following a button control being fired this would then ensure that the wrong button is not fire if the user accidentally scans before they set focus of the control. however the cursor only appears in the text box on original page load and not after the control has been updated.
textbox1.focus
updatepanel2.focus
Any body got any suggestions on this???? Is there a way that I can tell how the postback has been fired and therefore being able to trap it? The barcode value is 'pu00000343'
Thanks
Tom
|
|
|
|
|
Hi, i have one grid view which having one template column. In that item template contains linkbutton and edit template contains fileupload control.
When i am adding new row to gridview, the fileupload control will appear and i will upload the file. Up to this its working fine. But when i am in edit mode, i want to display the file name in fileupload control. But being its read only property, its not showing the filename in upload control and when it is submitting, the null value is entering in database.?
How can i show the filename or filepath in fileupload control, when gridview is in edit mode.
G. Satish
|
|
|
|
|
Satish - Developer wrote: fileupload control, when gridview is in edit mode.
Fileupload control don't have any constraints with gridview. It will be rendered as HTML upload control which don't allow to set the file path through code.
|
|
|
|
|
Some nasty javascript might do the trick. Use Attributes.Add("value", yourUrlString) in your codebehind.
I did this once for a password field:
txtPassword.Attributes.Add("value", readUserDetail["password"].ToString());
|
|
|
|
|
Hi,
I have a web service client app and I am trying to monitor the soap
traffic to and from my service with a tool called SoapUI.
The tool allows me too either create a TCP tunnel or a HTTP proxy.
So I am not sure which one I should use.
If we use the tunnel it has the web service url and a port to assign values
which I have done. https://www.mydomain.com/myservice.asmx port 8089.
But now how do I point my webservice client proxy to the SoapUI tunnel.
I tried this
https://localhost/myservice.asmx:8089
Does not work i get Connection was interrupted error.
Malcolm
|
|
|
|
|
I have a asp gridview named "gridview1" with three columns. The first column is
named "description" , second column "price", and the third "quantity". I
have added a template column to the gridview1 named "Total" and placed a text
box named "RowTotal" in the column.
Question-
How can I have the gridview multiply "price" by "quantity" and place the
result in the textbox "RowTotal" when the user selects the quantity amount
they want in the "quantity" column?
Thanks in advance for the help
|
|
|
|
|
In Quantity Column whether you having textbox or dropdownlist control.
|
|
|
|
|
And also tell the name of the primary key of your table,so that it will be helpful for us
|
|
|
|
|
In the OnRowDataBound eventhandler of a gridview you can check the values for price and quantity. Multiply them and show the value in your TextBox-object.
There are numerous examples to be found via codeproject.com or google.
|
|
|
|
|
Hi,
One way to do this by making all the columns in the grid as template columns.
then in the RowDataBound event using FindControl() method, set the value for Total label.
<br />
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem )<br />
{<br />
decimal Price = Convert.ToDecimal ( ((Label)e.Item.FindControl("PriceLabel")).Text );<br />
decimal Quantity = Convert.ToDecimal ( ((Label)e.Item.FindControl("QuantityLabel")).Text );<br />
Label TotalLabel = ((Label)e.Item.FindControl("TotalLabel"));<br />
TotalLabel.Text = Convert.ToString ( Price * Quantity);<br />
}<br />
<br />
Where did error begin?
-- Naison Garvasis Pekkattil
|
|
|
|
|
Could you help me with a VB example? The "Price" column is a money type in the database and the "Quantity" column is an int type in the database. Here is the code.
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs)
Dim TotalLabel As String
Dim Quantity As String
Dim Price As String
If e.Row.RowType = ListItemType.Item Or e.Row.RowType = ListItemType.AlternatingItem Then
End If
Decimal Price = Convert.ToDecimal ( ((Items)e.Item.FindControl("PriceLabel")).Text );
Decimal Quantity = Convert.ToDecimal ( ((Items)e.Item.FindControl("Quantity")).Text );
Decimal TotalLabel = ((Items)e.Item.FindControl("TotalLabel"));
TotalLabel = Convert.ToString(Price * Quantity)
End Sub
Thank you
|
|
|
|
|
Hi again...
I just wanna adjust location of a control like textbox whatever located on asp.net page and i wanna make it by using c# code at code-behind...
thanks in advance...
I am not a perfect programmer,but i have perfect's programmers' habits.
|
|
|
|
|
I suggest you buy a book on ASP.NET and read it. A book on HTML is an even better idea. Your server side controls, build HTML, that's how they work. You can use css to give a control an absolute position, but I would always avoid that, the flow model of HTML works well for browsers that can be resized or on different size screens.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi..
I don't know if you've ever used Gmail Upload type but I just wanna use that type upload. Ok let me tell you what i want There must be a button and when users want to add more than one file at the same time then they can just click on that button to add a new fileupload control without no page refresh and when clicking on Upload button all browsed and selected file is gonne go how can I do that ? how kind javascript code i have to use and the other processes.
Thanks in advance...
I am not a perfect programmer,but i have perfect's programmers' habits.
|
|
|
|
|
There are numerous commercial controls that do this, or you can use javascript to write your own.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Actually yeah I knew I should write my own codes but the problem is how i can do that ? Do you know any article or source code for that. It'd be so appreciated...
thanks.
I am not a perfect programmer,but i have perfect's programmers' habits.
|
|
|
|
|
The beauty of web programming is that any site that does what you want on the client side, sends you the code. The issue, from memory, is getting the controls on the server side so you can access the file data posted. I think I ended up adding a finite number of controls and show/hiding them with javascript, instead of just dynamically adding them with script.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have a major application with a few sub-applications.
One of my subfolder contains some utilities objects; that subdirectory is also inside my sub application.After conversion to 2.0 my main utility object(from the main app.) is ignoring the properties and methods that I have newly created so is the sub utility object...
Is legal to have the same folder in the main and the sub apps.?
|
|
|
|
|
Just a quick question, is the ASP.NET textbox control only capable of displaying pure text?
Is there anyway to embed a HTML link inside the textbox? Thanks!
If not, is there anything else I can use? Thanks!!!
|
|
|
|
|
Infernojericho wrote: Just a quick question, is the ASP.NET textbox control only capable of displaying pure text?
Yes. The TextBox control renders to a HTML INPUT tag which can only display unformatted text.
Infernojericho wrote: Is there anyway to embed a HTML link inside the textbox?
You could create a 'fake' textbox using a DIV tag with the contenteditable=true attribute. Not something I've really tried to do myself, but search Google and you should find some more information.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks for the reply.
Do you know if there are any 3rd party, and free (hopefully) textbox controls that support Hyperlinks?
Thanks!
|
|
|
|
|
FreeTextBox[^] is a free WYSIWYG textbox control for ASP.NET. It does a lot more than just hyperlinks, but I doubt you're going to find a control that just does hyperlinks. You'd have to write one yourself using the DIV approach I mentioned earlier.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Dear All,
I am using asp.net 1.1 and crystal report 11.
when I want to use the report in my project..I must open the report in VS
Then I should verfiy report for login(user name ,password,database..)
by right click on report then database-set location
I want parameter login,database of report to be passed at runtime.???
also I have done this for
rpt.SetDatabaseLogon(userName,password,server,databse,true);
verfiy
but I must done the prevouse ,,,
Yes. CreatiVity withOuT limiTs
modified on Wednesday, April 9, 2008 4:03 PM
|
|
|
|
|
Imports System.Data
Imports System.Io
Imports System.Data.OleDb
Imports CrystalDecisions.Shared
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.CrystalReports.Engine.ReportDocument
Imports CrystalDecisions.Web
Partial Class Test_rpt
Inherits System.Web.UI.Page
Dim cn As New ConnectionInfo
Dim con As New OleDbConnection
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\Website1\App_Data\Database_Name.mdb;Persist Security Info=True"
Call showreport()
End Sub
Sub showreport()
With cn
.DatabaseName ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\Website1\App_Data\Database_Name.mdb;Persist Security Info=True"
or
.DatabaseName ="Database_Name.mdb"
End With
Dim rpt As New ReportDocument
rpt.Load(Server.MapPath("report_name.rpt"))
Dim ParamFields As ParameterFields = Me.CrystalReportViewer1.ParameterFieldInfo()
Dim ParamField As New ParameterField
Dim ParamField_Value As New ParameterDiscreteValue
ParamField.Name = "prj"
ParamField_Value.Value = Session("prjnm")
ParamField.CurrentValues.Add(ParamField_Value)
rpt.ParameterFields("prj").CurrentValues.Add(ParamField_Value)
ParamFields.Add(ParamField)
ParamField = New ParameterField
ParamField_Value = New ParameterDiscreteValue
ParamField.Name = "dt"
ParamField_Value.Value = Session("dt")
ParamField.CurrentValues.Add(ParamField_Value)
rpt.ParameterFields("dt").CurrentValues.Add(ParamField_Value)
ParamFields.Add(ParamField)
ParamField = New ParameterField
ParamField_Value = New ParameterDiscreteValue
ParamField.Name = "sno"
ParamField_Value.Value = Session("maxsrno")
ParamField.CurrentValues.Add(ParamField_Value)
rpt.ParameterFields("sno").CurrentValues.Add(ParamField_Value)
ParamFields.Add(ParamField)
Me.CrystalReportViewer1.ParameterFieldInfo = ParamFields
Me.CrystalReportViewer1.HasRefreshButton = False
Me.CrystalReportViewer1.HasPageNavigationButtons = False
Me.CrystalReportViewer1.HasGotoPageButton = False
Me.CrystalReportViewer1.HasToggleGroupTreeButton = False
For Each cnInfo As TableLogOnInfo In Me.CrystalReportViewer1.LogOnInfo
cnInfo.ConnectionInfo = cn
Next
Dim ms As System.IO.MemoryStream
ms = CType(rpt.ExportToStream(ExportFormatType.PortableDocFormat), System.IO.MemoryStream)
rpt.Close()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "Application/pdf"
Response.AppendHeader("Content-Disposition", "attachment; filename=" & Session("inno1") & ".PDF")
Response.Buffer = True
Response.BinaryWrite(ms.ToArray())
Response.End()
End Sub
End Class
|
|
|
|