|
hi,
how to convert long type to time
Senthil kumar
|
|
|
|
|
That depends on what the long value represents in the respect of time. If it for an example represents seconds since a given time, you can use the AddSeconds method to calculate the time it represents.
---
b { font-weight: normal; }
|
|
|
|
|
my datatable is having five columns, I want to display only three columns in the datagrid,values of fourth and fifth colums should be display only after clicking button in the fourth and fifth columns .
|
|
|
|
|
Set AutoGenerateColumns="False" on your datagrid, and then manually set the columns marking the ones visible=false as needed.
|
|
|
|
|
Hi,
I am facing specific problem with firefox browser. I have integrated payment gateway in my website. it is working fine in internet explorer. But I am facing problem with firefox and opera browser. I have some values in session like client id, client name. when I redirect from payment gateway to own site(e.g. thankyou page) I want to access all session variable. It works fine in IE but in other browser session value destroy. it works in local system problem is with online only.
Plese Plese Plese Plese Plese Plese Plese Plese Plese Plese give me any solution
Thanks.
Bhushan
|
|
|
|
|
The session variables are stored in the Session object for the user on the server. There is no way that you can access session variables from a different server or even a different web application on the same server. The user is identified by a cookie, and that cookie is local to the domain, so when a user goes to a different site, he becomes a new user.
If you want to send information between web applications, you have to send it along as post data or querystring data.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for your reply .
But I am not accessing session variable in payment gateway. there is no problem with payment gate way. Problem occures when I return back from payment gateway to my own web page. e.g.-
step 1. payment page(my website page)
step 2. paypal (payment gateway)
after successfull payment on payment gateway when we click "return to merchant" button..
step 3. thankyou page (my website page)
I want to use session variable "I created in payment page(my website page)"
I can use these session variable in IE but in case of firefox or opera I cannot get these variables.
Thanks
Bhushan
|
|
|
|
|
HI Every1
I have one dataset which contains datatable.I want to fire the query on that datatable?Is it possible?How can I do it?Pls reply me if u have any ans. it's urgent.
Thanx
monika
|
|
|
|
|
I think u r using dummy table.and then putting that dummy table into the dataset.
Now before putting the dummytable inti the dataset u should put only those columns of datatable which r required or u can use row filter function of dataview.
or the following cod ecan help me get rig of ur problem.
Take a variable of type dataview
Dim dvwPages As DataView
now put ur dataset into the dataview
dvwpages=ds
now if u have any datagrid to populate it with that database
and also want to make some order
for that
dvwPages.Sort = "field name of dummy table"
now that datagrid
dgrdPages.DataSource = dvwPages<br />
dgrdPages.DataBind()
-- modified at 3:12 Saturday 23rd September, 2006
|
|
|
|
|
Hi,
+You may Refer DataView Class[^]
+This DataView Class will help u, for getting the customizied view of ur DataTable.
Regards,
Jay
|
|
|
|
|
Hi,
If u r using VS 2005, You may use DataSet Designer. It is very useful.
DataSetDesigner[^]
Regards,
Jay
|
|
|
|
|
Here I have a problem that .i am using calender in my webform,when i pick a date from calender into a textbox and again i need to insery that Textbox value into Database Date/time datatype column.
my code is as below
cmdins = "Insert into Employee(empid,dateofbirth)values('" & txteid &"','" & txteid &"')"
Here the error is ,the conversion of char datatype to small date/type resulted outofrange value.
So how to convert this textbox value(ie date)to insert into database table.give me a solution.
|
|
|
|
|
Both textboxes have the same id?
Apply # to the adjacent of textbox values for date for conversion(if u have date datatype in the database.)
|
|
|
|
|
Dim dob1 As Date
dob1 = Date.Parse(Txtdob1.Text)
cmdins=insert into employee(empid,dateofbirth)values(1,#" & dob1 & "#)"
Here in my database its datatype is smalldatetime and
i am trying to isnert as above with the date 05/09/2006,it is giving error as ,
'#5' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
How to give correctly,
Give me an idea
|
|
|
|
|
If u r using sql server then just use single codes don't use # otherwise in case of access it is right.
Now the qusetion is which database u r sging
|
|
|
|
|
Here i am using Sqlserver and my database datatype is 'smalldatatime' and i am taking date from calender into textbox.
Now i tried with all types of inputs means,
'" & txtdob1.text & "',and" & txtdob1.text & " and #" & txtdob1.text & "#.Why all these are giving error,How to convert this text value into datetime datatype and how to insert into database table.
Give me correct idea,I have no idea.
Whether the following format is correct or not???
#" & Format(Txtdob1.Text, "dd/mm/yyyy") & "#
give me correct solution.
-- modified at 4:47 Saturday 23rd September, 2006
|
|
|
|
|
The problem is that the database is not using the date format that you are using, so it interprets the date differently.
Use DateTime.Parse or DateTime.ParseExact to parse the string to a DateTime value, then use a parameterised query to send the value to the database.
---
b { font-weight: normal; }
|
|
|
|
|
Dim dob1 As DateTime
dob1 = DateTime.Parse(Txtdob1.Text)
cmdins = "insert into employee(empid,dateofbirth)values(1," & dob1 & ")"
how to insert into database table?
The above code i have given.why it is still giving an error,wat must i have to use.
give me a solution plese.
Thanks
-- modified at 5:32 Saturday 23rd September, 2006
|
|
|
|
|
Because you are still adding the date to the query in the wrong format. If you for an example enter todays date, and that is added to the query in the format 23/9/2006, that will be interpreted by the database as a numeric expression that calculates as roughly 0.001274.
If you don't want to use parameterised queries, you have to specify a format for the date that the database can understand.
Also, when you seek assistance with a problem, it's very often very helpful if you are a bit more specific than "an error".
---
b { font-weight: normal; }
|
|
|
|
|
hi can I use the code for show the image in data grid or data list? i have 30 products that 28 of them have image but 2 of them dosen't have, when I try to show the image in datalist for 2 product that dont have image datalist show imagebutton whithout any image with red 'x' I want to do something that if the product dont have image the datalist dosent show image button. Please Sggest in VB.net!
Vivek Khare
|
|
|
|
|
If u don't have image for the particular record.Then do the followiunf thing.
U have a function named Visible for the image control.Write a return type function for that Visible function
in the html view.
now in the code behind file
include the imports system.io
publilc function FindVisibility(byval filepath as string)
if(path.exist(filepath))
return true
else
return false
End sub
Hope this may help u.
|
|
|
|
|
Thanx a lot amaneet.
It is done!
Vivek Khare
|
|
|
|
|
i would really love to use SOAP extensions, but i cannot seem to configure them so that ProcessMessage ever gets called. If anyone would be willing to help i can send a zip file of the smallest example i can construct from the MSDN documentation. The sample compiles. The service page loads. The webmethod gets called, but neither ProcessMessage nor any of the other SOAP extension code gets called.
|
|
|
|
|
Sir,
I am trying to write a web app that allows the user to capture audio from the client machines microphone. Can u help me how to captures the audio.
Thanks
|
|
|
|
|
I'm using C# and ASP.Net in all of this.
So I'm basically not internalizing the concept, there's missing steps in the samples or I'm just thick.
Here's what I think I want to do:
1. I have a page MediaGallery.aspx in it I have 20 Image controls.
2. I want to pull images from SQLServer using a streaming ImageStream.aspx page that writes out the image as a byte[] stream.
3. The Page_Load event of the ImageStream.aspx will use a query string to parse the ImageID and pull the image from the sqldb and stream it out.
4. ImageX (where x > 0 < 21) will have it's .ImageURL = "ImageStream.aspx?ImageID=x".
My questions go like this. How exactly (please show me with some code if you don't mind) do I do this iteratively so that I can fill all 20 Image controls with the correct image and not have 20 instances of ImageStream.aspx? How do I close that page? Do I need to? How do I do this gracefully? I'm guessing since the Page_Load event of ImageStream.aspx outputs a binary stream that ImageStream.aspx never gets created as a page it just becomes a binary stream and that's that. If so how do I dispose of that stream or do I let the CLR manage that?
If someone could provide a snippet that shows how to link that up that would be really cool.
- Rex
|
|
|
|