|
The OP was not asking for the difference between 2 datetimes, he asked for a datetime minus 2 days
|
|
|
|
|
Buy a basic ASP.NET book and read it. Learn to use intellisense to investigate methods on a class. Learn to use google, and the MSDN site in particular. Asking in the right forum ( this has nothing to do with ASP.NET )
The DateTime class has everything you need.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
As counter-intuative as it might seem at first glance, it is totally appropriiate to supply a negative number to the AddDays[^] method on a DateTime.
|
|
|
|
|
There is dropdownlist on my page which showes country name. on click of country name popup will get display which showes companyname of selected country , and same dropdown will again get display.
In Popup dropdownlist ,it will display selectedItem value (CountryName)as which we have selected from main page.
for tht i have return code as follwes
drdCountry.DataTextField = "CountryName";
drdCountry.DataValueField = "CompanyCount";
drdCountry.DataSource = dsCoverageList.Tables[0].DefaultView;
drdCountry.DataBind();
drdCountry.SelectedItem.Text = Request.QueryString["CountryName"].ToString();
drdCountry.SelectedItem.Value = Request.QueryString["CompCount"].ToString();
but prob is on popup page in dropdownlist is showes duplicate value of selected item
means suppose i have selected US (CountryName) from main drplist thn in popup page is showes US 2 times in DrpList.
why is it so??..
please help me out..
|
|
|
|
|
use page.ispostback check on page load
or clear dropdown list before filling it...
Government Dyal Singh College Lahore.
|
|
|
|
|
i have writ code in (!IsPostBack)
still its not working..
|
|
|
|
|
Hi,
What namespace should I use in order to access the Membership.ValidateUser() method?
I have added using System.Web.Security and I have added System.Web in the References folder but I cannot access Membership????
Illegal Operation
|
|
|
|
|
using System.Data.OleDb;
|
|
|
|
|
Have you added the right dlls to your project ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I found the issue.
I had a folder named Membership. I changed the name of the folder and the inheritance of the code behind and now it works!
Illegal Operation
|
|
|
|
|
|
Hi all,
i am trying to get the text from a label that it is inside of a detailsview field. This field is in fact a template field, and inside its ItemTemplate there is the Label control (ID = "Label8") which Text property i want to read.
i tried the following without success (returns c = null):
System.Web.UI.Control c = dvCU.FindControl("Label8");
string s = ((System.Web.UI.WebControls.Label)c).Text;
can anyone help me?
Thanks in advance.
modified on Tuesday, April 7, 2009 4:27 PM
|
|
|
|
|
where is your code. In other words, which method is your code in.
you can not get the controls the way you are showing.
1. you need to access your details view control
2. then you need to access specific row in the control
3. then you need to do a find
protected void grdItemDetail_RowDataBound(object sender, GridViewRowEventArgs e)<br />
{<br />
Image img = (Image)e.Row.FindControl("Thumbnail");<br />
}
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi Yusuf,
the code is located on a void arguments method, which i invoked somewhere inside the "father" gridview _SelectedIndexChanged() method :
public void BlahBla()
{
...
System.Web.UI.Control c = dvCU.FindControl("Label8");
string s = ((System.Web.UI.WebControls.Label)c).Text;
}
You are right, i think now the problem is that i need some argument that contains the detailsview control so i can access it in right way. So i went to the detailsview_DataBound() event, and did this:
protected void dvCU_DataBound(object sender, EventArgs e)
{
if (((DetailsView)sender).FindControl("lblAlcance") != null)
iAlcance.ImageUrl = "~/Recursos/Iconos/Alcance (scope)/" + ((System.Web.UI.WebControls.Label)((DetailsView)sender).FindControl("lblAlcance")).Text + ".png";
if (((DetailsView)sender).FindControl("lblNivel") != null)
iNivel.ImageUrl = "~/Recursos/Iconos/Nivel (level)/" + ((System.Web.UI.WebControls.Label)((DetailsView)sender).FindControl("lblNivel")).Text + ".png";
}
and... voila!! the thing worked as charm!!
Thanks a lot for your help.
Sorry if i explain not very good, i am very noob at asp and c#.
|
|
|
|
|
you are welcome. I'm glad to help.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
I am trying to develop a Time Sheet Application. In that, I need to sub-divide a "Date" Column in to two columns as "Regular Hours" and "Over Time Hours. I am using TemplateFeilds for the Column. Can any one tell me how can I sub-divide a column into two columns???
Thank you in advance
|
|
|
|
|
Look at this CP article: Merge Header - Gridview/DataGrid[^]
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Thx for your post.Hlpd me alot.
|
|
|
|
|
Thank you, Glad to help.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Hi Guys,
I am trying to build a login control in a website. I am trying to use ASP.NET login control.
How can I use ASP.NET login control? (I am new for it)0
And I want to add password validation and want to provide two options for users
1) Minimum password length
2) Some combinations of alpha numeric characters.
And
3) Providing roles to employees
Could you please provide me few codes which can help me build it?
Thanks
|
|
|
|
|
Have you searched the web, or even this site for articles ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Sr...Frank wrote: (I am new for it)
You need to read the ASP.NET login control. Here this[^] should be starting point
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
We have a POS web site (for our sales people) who use a signature pad/stylus to capture the signatures of our clients. We're thinking of allowing our clients direct access to this system, and would like them to be able to sign thier names, using the mouse.
I've searched this site, and others, but haven't been able to come up with anything source code example wise that seems to be written for webpages (I have found a few pocket PC apps). We want to use it for other things besides signatures so we'd love to be able to customize the code to fit our needs.
Short of just paying someone for thier "app" plus source code (I don't have an issue, but the boss does), has anyone done this before or have a link to someone?
Thanks.
|
|
|
|
|
The reason for this is that a web site can't do that. Only an active x or java plugin could offer you that sort of functionality over the web.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|