|
Hi friends
i am working on project schedule application
I have one dropdownlist and I have three option "Today","This week" and "This Month" to search project.
I have done for "Today" and "This Month"
Now I want to search for "This Week"
I want to Get date from mon to sat of current week.
I know about DayOfWeek Method but it returns current Day Of Week.
Is there any method of datetime to Get Mon to Sat date of Current Week?
Thanks in advance
Pathan
---------------------------------------------------
|
|
|
|
|
Just off the top of my head...didn't check it but this is the basic concept
DateTime BeginningOfWeek = DateTime.Today;
while( (BeginningOfWeek = BeginningOfWeek.AddDays(-1)) != DayOfWeek.Sunday);
DateTime EndOfWeek = BeginningOfWeek.AddDays(7);
only two letters away from being an asset
|
|
|
|
|
Thanks but I am getting this error
Operator '!=' cannot be applied to operands of type 'System.DateTime' and 'System.DayOfWeek'
Pathan
---------------------------------------------------
|
|
|
|
|
Thanks
Its working now
Pathan
---------------------------------------------------
|
|
|
|
|
Hi all,
I have two files binary and xml file, xml file is contain
lenght of tag. now my problem is how to convert binary file
into xml file mapping with xml file.
Thanks
sonal dadhania
|
|
|
|
|
Hi all. I have a problem auto-tabbing.
I need the text boxes on my form to auto-tab to the next textbox when they're full. I can do this using JavaScript and input controls, but unfortunately, I need to get at the contents of the text boxes using the code behind page. (And I can not for the life of me figure out how to call javascript from an asp:textbox control.)
Does anyone have any suggestions of examples on how to do this? (I couldn't find anything that worked with google :/ )
- Munty
|
|
|
|
|
try this
code behind function
public static void SetFocus(Control control)<br />
{<br />
StringBuilder sb = new StringBuilder();<br />
<br />
sb.Append("\r\n<script language='JavaScript'>\r\n");<br />
sb.Append("<!--\r\n"); <br />
sb.Append("function SetFocus()\r\n"); <br />
sb.Append("{\r\n"); <br />
sb.Append("\tdocument.");<br />
<br />
Control p = control.Parent;<br />
while (!(p is System.Web.UI.HtmlControls.HtmlForm)) p = p.Parent; <br />
<br />
sb.Append(p.ClientID);<br />
sb.Append("['"); <br />
sb.Append(control.UniqueID); <br />
sb.Append("'].focus();\r\n"); <br />
sb.Append("}\r\n"); <br />
sb.Append("window.onload = SetFocus;\r\n"); <br />
sb.Append("// -->\r\n"); <br />
sb.Append("</script>");<br />
<br />
control.Page.RegisterClientScriptBlock("SetFocus", sb.ToString());<br />
}
write this code in html view
<script language='JavaScript'><br />
<!--<br />
function SetFocus()<br />
{<br />
document.Form1['TextBox1'].focus();<br />
}<br />
window.onload = SetFocus;<br />
</script>
write this code at code behind
PageUtility.SetFocus(TextBox1);
regards
GV Ramana
|
|
|
|
|
I'm using VB as the code behind language
there is no PageUtility function either. :/
For now im sticking with the tags, as I can get auto tabing to work.
My next problem is getting the tags to clear after the page has loaded. (I can't do it on submit because that will clear all of the form, which I don't want. And i cant have a seperate form, because ASP only allows me one form that can run at the server.
help!
- Munty
|
|
|
|
|
hai all,
how to avoid page refreshing in aspx page. when i select the value in drop down list the page refreshed..In that time i have manipulate with database..So it wil take much time for loading... How can avoid this problem... i have develop my project using c# with asp.net
Thanks®ards,
vidyasankar N
pain gives gain
|
|
|
|
|
set its AutoPostBack property to false
regards
GV Ramana
|
|
|
|
|
Hi VidyaSankar...
The postback issue can be overcome if u use AJAX concept in ur application
Regards,
Balaguru
|
|
|
|
|
how to use ajax in particular asp.net webcontrol... you know any sample code... pls send me...
thanks®ards,
vidyasankar N
pain gives gain
|
|
|
|
|
Hi Sankar..
There are many ways in using Ajax..I use a .dll to work with ajax..AS like Ramana said capture the dropdownlist events with javascript and that works fine,but the thing is that u have to go for functions sacrificing the dropdownlist_selectedIndex changed property..
Regards,
Balaguru
|
|
|
|
|
if u dont want to use AJAX then
capture dropdownlist event in javascript & by using javascript manipulate the DB.
regards
GV Ramana
|
|
|
|
|
|
i think you can use html control and fill the drop down when page loads.
this will load the datas when page loads and minimize loading time.
|
|
|
|
|
difference between interface and abstract class
|
|
|
|
|
use google
regards
GV Ramana
|
|
|
|
|
main diff..
Interface-all the methods should be a abstract...
abstractclass-it have normal method and or abstract method......
pain gives gain
|
|
|
|
|
Read How to get an answer to your question
only two letters away from being an asset
|
|
|
|
|
<asp:hyperlink id="Hyperlink1" runat="server" Font-Names="Arial" ForeColor="DarkSlateGray" Width="48px"
BorderStyle="Outset" Height="18px" BorderColor="ActiveCaptionText" BackColor="ScrollBar"
NavigateUrl='<%# "FrmTempEmployeeEdit.aspx?Code=" + Eval(Server.UrlEncode("ddlcontractor.selecteditem.value").ToString()) %>'
BorderWidth="1px" Font-Bold="True">Edit</asp:hyperlink>
Hi i am trying to pass one value using hyperlink
In that i am getting compilation error...,
Name Eval is not declared like...,
Plz any one solve this probs,
Regards,
Magi
|
|
|
|
|
If I'm not mistaken then Eval can only be used within GridView, Repeater, DataGrid, ... and not in a Hyperlink.
1) try to simply remove the Eval, if this doesn't work ...
2) Call a method on your code behind code that will return the string you need:
'<%# "FrmTempEmployeeEdit.aspx?Code=" + MyMethod("ddlcontractor.selecteditem.value") %>'
in code behind
protected string MyMethod(string s)
{
return Server.UrlEncode(s);
}
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
hello,
im creating a project for my studies and i want to know how is it possisble to add more controls like CAPTCHA , avatar url to the asp.net membership provider and what are the needs i have to do in order to achive these
aneef
|
|
|
|
|
I have a linkbutton(with enable=false) in a page.
I want to make it's enable true in another page.
how can I do this?
|
|
|
|
|
If you enable that true in another page how will it help?
The user cant see as he is in a different page and the lnkbtn is in a different page!
What is you requirement?
gauthee
|
|
|
|