|
Convert.ToInt32(DecimalValue)
or
lblValue.Text = decimalValue.ToString("#,#0");
or
txtValueBox.Text = decimalValue.ToString("#,#0");
|
|
|
|
|
thansk for your answer but in case if there is 99.45 in database it converts it back to 99
in this case i want to show 99.4, kindly reply ASAP.
|
|
|
|
|
thanks for your answer but in case if there is 99.45 in database it converts it back to 99
in this case i want to show 99.45, kindly reply ASAP.
|
|
|
|
|
|
thanks i have did it, thanks for ur help.
|
|
|
|
|
i want today present time
for that i used this code
Public Function Date6() As String
Dim NewTime As DateTime
NewTime = Now()
Return NewTime.ToShortTimeString()
End Function
its working in local host i.e when run project
but the same page when i upload into site
it is not giving correct time
plz help me
thanks in advance
vijay
|
|
|
|
|
that usuaully means your server is displaying the wrong time, check this out first
|
|
|
|
|
Hi
I am wanting to create a form that someone can send an email to a list of people being pulled out of my database, but struggling to work out how i can bring all the email addresses back? Is there a way that i can bring all of them back into a label/textbox and seperate them with a ; and use that for my To? Or would it be best to loop through the records?
Any help would be appreciated.
Regards
Adam
|
|
|
|
|
something like:
"select email from table"
store results in a datatable
for each row in database add result to your label or To textbox and use += for each row.
that is a start anyway
|
|
|
|
|
This will give you a list of comma delimited email addresses (eg bob@a.co.uk, fred@abc.com, joe@khg.com)
DECLARE @EmailList varchar(1000)
SELECT @EmailList = COALESCE(@EmailList + ', ', '') + e.EmailAddress
FROM emailtable
WHERE .....
SELECT @EmailList
Of course you may want to change froma comma to a semi-colon
Hopefully this will help
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi
Thanks for your reply, unfortunatley not, ive not worked with COALESCE before and im not sure how you mean to go about putting this in my sqldatasource? The table is just made of 2 columns.
membersemail
id - int
email - varchar
Thanks
Adam
|
|
|
|
|
COALESCE simply takes the first nonnull value from the list given. You would do it as a bit of SQL, running on a connection/sql command, not a datasource, it just returns a single column.
Hopefully this clarifies things
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi!
I have a site using MySQL provider for users and membership and their password are hashed.
Now I am rewriting the code and moving to MSSQL provider where the users password are stored hashed but also uses "salt" which I haven't heard of before but seems like som kind of random number to generate the hashed password I guess.
Now to my question, can I transfer all my users to the new database and let them keep the same password without bothering them or do I have to give them/ask them for a new password at the same time as they move to the new site? My membership database in MySQL don't have any column for "salt". Only the hashed password. Is there any way to copy their old hashed password to the new format that MSSQL provider wants?
|
|
|
|
|
How to write Validation code for Textbox control in .Js file.
I am using masterPages, and the textbox control is in default.aspx.
Now my aim is to write required field validation(CleintSide validation) for that textbox in validation.Js file.
How to call textbox control with name txtname in validation.Js to check is it empty or not.
When i Write in the pagebehind, i write like this
<script type="text/javascript" language="javascript">
function validate()
{
var=document.getElementId("<%= txtname.CleintID %>");
if(var=="")
alert("");
return false;
}
</script>
when i write like above code in validation.Js file it is not working.
Please provide solution for that...
Thanks
Pinna
|
|
|
|
|
What you can do here is to write a function in your validation file which will accept the textbox control as parameter and will return true/false depending upon the criteria.
This method you can call in the web page where your control is available.
Apurva Kaushal
|
|
|
|
|
I want to add an event to a text, just as we have hyperlinks, so that when the user clicks on that text, i want to perform some action in the code-behind.
I want something similar to what is available here in this forum,
u click the 'subject' text of this message, & you can read it ...
|
|
|
|
|
Use LinkButton.
Apurva Kaushal
|
|
|
|
|
Apurva Kaushal wrote: Use LinkButton.
can you elaborate a bit more ... plz ....
|
|
|
|
|
LinkButton is control which looks like a hyperlink and works like a button control. That is why I told that it will look like hyperlink as you want and you can have a click event associated with it wher you can write the code.
Apurva Kaushal
|
|
|
|
|
thanx,
i will look at it ...
|
|
|
|
|
how to count that a particular user has login to a website how many times a day in dotnet
|
|
|
|
|
Store the login information (login time and date) in he database. Once you have these in database you can get any type of reports day wise or week wise whatever you want.
Apurva Kaushal
|
|
|
|
|
Hi any body has got the idea of Wiki. How to implement Wiki in Dotnet.
What are the requirement we need to usew wiki in .net.
Please provide me any suitable information. i have not much idea abut wiki.
Thanks
Avesh Agarwal
|
|
|
|
|
You mean to say that you want to create a application where pages can be modified by the visitors?
Apurva Kaushal
|
|
|
|
|
yes....any solution for this
Amit Agarwal
|
|
|
|