|
Hi,
Try with
Date.ToLongDateString()
Date.AddDays(1)
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
Hi sherin tkx for ur reply,
i used that function only Date.ToLongDateString(). i want next 4 days exept saturday and sunday. how to make loop please give some ideas. if u have coding please give me.
thanks advance
Praveen Kumar.R
|
|
|
|
|
Hi,
Try this
<br />
DropDownList1.Items.Clear()<br />
Dim dt As Date = Now<br />
Dim i As Integer<br />
For i = 0 To 3<br />
If (dt.DayOfWeek <> DayOfWeek.Saturday) Then<br />
If (dt.DayOfWeek <> DayOfWeek.Sunday) Then<br />
DropDownList1.Items.Add(dt.ToLongDateString())<br />
Else<br />
dt = dt.AddDays(1)<br />
DropDownList1.Items.Add(dt.ToLongDateString())<br />
End If<br />
Else<br />
dt = dt.AddDays(2)<br />
DropDownList1.Items.Add(dt.ToLongDateString())<br />
End If<br />
dt = dt.AddDays(1)<br />
Next<br />
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
Dear all,
Here i had a problem that when i click a textbox,it has to give the sum of two other textboxes.
I have two ideas for this,
1,using javascript
function getBal(obj)
{
var v1 = document.getElementById('txtbox1').value
var v2 = document.getElementById('txtbox2').value
if ( !isNaN(v1) && !isNaN(v2) && !isEmpty(v1) && !isEmpty(v2) )
{
var baln = parseInt(v1) + parseInt(v2)
obj.value = baln
}
else
{
alert("Please fill the fields with valid numbers")
}
}
function isEmpty(txt)
{
if (txt == "")
{
return true
}
else
{
return false
}}
2,make textbox2 property autopostback=true and on textchanged event ,i will add both the values and put in the third textbox.
Private Sub Txtbox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtExpectedYield.TextChanged
Txtbox3.Text = Integer.Parse(Txtbox1.Text) + Integer.Parse(Txtbox2.Text)
End Sub
Apart from these two can i do in any other way??
only by clicking textbox3,it shd give the sum.if txt1 or txt2 are blanks then it shd assign 0 and give the sum.
How to do this???
Thanks in advance
kissy
|
|
|
|
|
No, you've got both bases covered, do it on the client, or do it on the server.
Except that you probably want a button to post back, not the text changed event.
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 )
|
|
|
|
|
Hi,
I am doing a shopping cart in which I need to do
ICICI PAYSEAL INTEGRATION WITH ASP.NET.
Any body can help me by giving code or idea about the same.
Sameeran
|
|
|
|
|
|
I am creating a site that contains large documents that are stored in the database. I have to provide the search functionality in the web site. so somebody can help me in designing the search functionality.
Is there any document avilable that describes the web search functionalty design like yahoo, google etc.
Ashwani
|
|
|
|
|
I am using DTSearch and it's really nice. It has APIs and does a crawl of your site. I haven't aimed it directly at a database yet but I guess the functionality is there. Otherwise, I always create some kind of webpage that the DTSearch engine can crawl.
dtsearch.com/
|
|
|
|
|
Hi All,
I am developing Rich Text Editor and I am have to save the text in DB, the problem I am facing is with bullet list or ordered list.
Actually when newline comes it replaces the newline with some kind of box and in DB it saves all the contents which is before that box.
I need to save the whole text with newline and retrive the same text with newline.
Please help me...
Thanks in advance
|
|
|
|
|
You need to escape the unprintable character with a slash:
newline is \n
return is \r
Not sure if this will help. Can you give more information if it doesn't?
|
|
|
|
|
Thanks for the reply I got the solution but now I am facing different problem. I need to show the text on page load where text is fetched from DB.
I know I have to use Jaavscript but not getting the syntax.
Please help...
Thanks in advance...
|
|
|
|
|
You're using Javascript to get the information from a database? So you're using AJAX?
In either case (using AJAX or not) you need to have a server side page that will return the results. If you want to show the results with Javascript the server side db connection page will need to display the db resultset in a way that Javascript can read: either in XML or JSON or something else. JSON works really well and is bandwidth conservative: json.com/
|
|
|
|
|
I have one aspx page in which i am calling an Axplayer popup
window by clicking on a button.Popup window will play the video.It
does not contain any controls.
When i close that window ,the aspx page from which i am calling should get refreshed.I want code for this in C#.Please give reply soon.
Thanking you,
Await yur reply.........
|
|
|
|
|
Use
window.location.reload();
in javascript on parent aspx page.
|
|
|
|
|
To make the browser load the page from the server, and not just reloading it from the cache, inlude a true value in the call:
window.location.reload(true);
---
single minded; short sighted; long gone;
|
|
|
|
|
Add an OnUnload event handler in the popup window that points to a method.
In this method, code the following:
if (self.opener) {
self.opener.location.reload();
}
|
|
|
|
|
good day if my first question is hard to understand...
how to make a bound column into a buttom Column / or link column?
thanks
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Hi,
Do u want to display data from the datasour in the text property of button or link?
if yes then you can create <asp:buttonfield> column as following
<asp:ButtonField ButtonType="link" DataTextField="fieldname" CommandName="commandname"/>
This will display a linkbutton column with the text property from "fieldname" column from the datasource.
I hope this will help u.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Sir thank you it gives me an idea..
but this is not what i wanted although its close to it...
i have 3 columns with databounds, and i want the first column to have a capability of link or same as button field...
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Hi,
You can order your columns as u want by making "autogenerantecolumns" propertry of gridview to false and creating your column in order whatever u want.
see the following example.
<asp:GridView runat="server" ID="gv" AutoGenerateColumns="false">
<Columns>
<asp:ButtonField ButtonType="link" DataTextField="username"/>
<asp:BoundField DataField="username" />
<asp:BoundField DataField="password" />
</Columns>
</asp:GridView>
Here the first column will have a link button and next two column will just display data.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
good day to everyone im new to asp.net and using a 2005 version
i need help on how to set a buttonColumn to any column on my grid in asp.net2005...
i used this inserted this code :
<--! ButtonColumn CommandName="select" HeaderText="Employee"
''' DataTextField="EmployeeName" /> -->
i encounter this error:
Parser Error Message: System.Web.UI.WebControls.DataControlFieldCollection must have items of type 'System.Web.UI.WebControls.DataControlField'. 'asp:ButtonColumn' is of type 'System.Web.UI.WebControls.ButtonColumn'.
anyone, pls i need help
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Hi,
I dont know is this your are expecting.
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:ButtonField ButtonType="Button" Text="Button" />
</Columns>
</asp:GridView>
if not, specify what you are trying to do.
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
to be simple i had three columns in my gridview and all three columns had bound values / data...
the thing that i wanted to do is how to make the first column that has bound data into a buttonColumn for selection?
start a new beginning in every ending; thats what life for......
|
|
|
|
|
moomoooomoo wrote: bound data into a buttonColumn for selection
Can You explain this?
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|