|
Hi,
I am little struggled with this ..
in my project i want to subtract date(may be moonth sometimes) value from current datetime using asp.net c# ..please anybody help me..
regards
alex.
|
|
|
|
|
see if this helps
System.DateTime.Now.AddDays(-5)
same thing with hours, months etc....
Sri
|
|
|
|
|
Hi,
Thanks ...
regards
alex.
|
|
|
|
|
ASP.net 2.0, Sharepoint2007
<zonetemplate>
<asp:declarativecatalogpart id="DeclarativeCatalogPart1" runat="server">
<webpartstemplate>
<uc1:calculator id="Calculator1" runat="server" title="Testing" exportmode="All">
------------------------------------------------------------------------------------------------------------------------
Calculator.ascx:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim gwp As GenericWebPart
gwp = Me.Parent
gwp.ExportMode = WebPartExportMode.All
End Sub
-----------------------------------------------------------------------------------------------------------------------
I added this to web.config in sharepoint site:
<safecontrol typename="*" safe="True" namespace="ASPNETWebPart" assembly="ASPNETWebPart">
and added the exported web part to the bin directory
-------------------------------------------------------------------
I imported calculator.webpart to sharepoint and I had the following error:
Unable to add selected web part(s). The <type> element is required.
Add this element to the Web Part file (.webpart), and then try to import the Web Part.
What did I do wrong
Thank you
|
|
|
|
|
Hi. to all
I m using crystal reports in .Net i.e with asp.net.
once the crystal report is displayed in the viewer it just looses the alignment. all columns of report get center alignment. I want to display the alignment as it is in crystal report. Pls tell me the solution
By:
Hemant Thaker
|
|
|
|
|
Hi
I want to implement blog in my project. Is there any opensource
blog software available for .Net which i can integrate in my project.
Please help me to solve my problem.
Thanks.
Rahul
People Laugh on me Because i am Different but i Laugh on them Because they all are same.
|
|
|
|
|
try to find in Google
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
If you are not really caring about the looks (css,images) I suggest Marc Clifton's Blog Engine[^] here in CP
|
|
|
|
|
Hi There,
I am using GridView, where i am Updating and Adding new records.
I have TextBoxes in Edit Template, for Update, and TextBoxes in Footer Template for Adding New Record.
My problem is, when i am Clicking the Update LinkButton , the TextBox Validators of Footer Template are also being check and fires Validation.
I believe the only solution to my problem is to disable or make RequiredValidator false of the textbox using Javascript.
(The Validator is combined with textbox)
This is my script.
function Validate()
{
document.getElementById('GVRoomType_ctl07_txtNewName').disabled= true;
alert(document.getElementById('GVRoomType_ctl07_txtNewName'));
}
<asp:LinkButton ID="lbtnEdit" runat="server" OnClientClick=Validate() CausesValidation="False"
Any Help would be appreciated,
Thanks
Cheers
Menon
|
|
|
|
|
why don't you use .net validations???
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
Hi Paras,
I found this nice textbox on Codeproject itself. Which has all the Validators in it.
I mean Required Field, RegularExpression and date, and lot more good properties.
Now for example if I am using .net Validators, still please tell me how can i make those validators disable.
Eg: txtEditName, txtNewName are my two textboxes.
The Validator with txtNewName should not fire when i click the Update LinkButton and the Validator with txtEditName should not be fired when i click the AddNew LinkButton
How is it possible without Javascript.
I have no problem in using .net validators if i have this solution.
What I want is. Just to Disable a textbox on the click of Button.
Thats it. I am sure there must be a way.
Thank you for your help friends in advance
Cheers
Menon
|
|
|
|
|
Hi Frnds,
Whenever I run the solution , the web page opens in Mozilla Firefox. Even my default browser is set to IE 6.0.
How can I open the web page in IE.
Thank You
|
|
|
|
|
Rahul Babu wrote: Whenever I run the solution , the web page opens in Mozilla Firefox. Even my default browser is set to IE 6.0.
How can I open the web page in IE.
Right click on the ASPX page, choose browse with and add the browsers you want
|
|
|
|
|
There is nothing called Browse with here.
|
|
|
|
|
Rahul Babu wrote: There is nothing called Browse with here.
I mean in VS2005 ? Are you using an old version ? If so, sorry i don't know how to do this
|
|
|
|
|
iam using VS 2005 ...... there is something called View in Browser .... did u mean that
|
|
|
|
|
In VS 2005 you can have that option
I mean Right Click on the particular page and click on Browse with option
that will display all browsers on your system, also you can set the default browser
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
ok ok I got it ....... Thank you very much guys
|
|
|
|
|
Rahul Babu wrote: there is something called View in Browser .... did u mean that
No. I can see "Browse With" option just down to what you said. It will display a list of available browsers. Do you see that ? Note : you have to right click from solution explorer
|
|
|
|
|
thank you Navaneeth ..... I got it
|
|
|
|
|
|
Page.ClientScript.RegisterStartupScript(this.GetType(), "pop-up", "javascript: return window.alert('Agree Terms & Conditions to proceed');");
this code just writes whatever in the last parameter like:
javascript: return window.alert('Agree Terms & Conditions to proceed');
i need to pop-up
Thanks in advance,
Priya.
|
|
|
|
|
What you want please can you clarify ?
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|
|
i want pop-up to be displayed, if user not checking the checkbox
Thanks in advance,
Priya.
|
|
|
|
|
on button click event which was already suggest you
if (document.getElementById('checkboxid').checked=false )
alert("message");
else
return false;
-- modified at 23:29 Thursday 4th October, 2007
Parwej Ahamad
g.parwez@gmail.com
|
|
|
|