|
foreach(User in Users)
{
MailMessage.To = User.Email;
MailMessage.Body = ...
}
or
MailMessage.Body = ...
foreach(User in Users)
{
MailMessage.To = User.Email;
}
only two letters away from being an asset
|
|
|
|
|
Hello,
I want to set javascript variable value to session variable in javascript.
I am able to get Session Variable value to javascript variable
as,
<%string str="s2345";Session["Resolution"]=str;%>
var Id=('<%=Session["Resolution"]%>');
But I want to set javascript variable value say screen.width to my Session Variable.
Please let me know if someone knows the way
Swapnil Bhavsar
|
|
|
|
|
swapnilbhavsar wrote: I want to set javascript variable value to session variable in javascript.
javascript runs on the client-side. session is a server-side object.
you can't set javascript variable value to Session Variable in javascript.
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
You have to pass the javascript variable to the server somehow, and set the session variable there.
You can use AJAX methods, or some postback event to get the variable to the server.
only two letters away from being an asset
|
|
|
|
|
How to implement a class library in asp.net with code
|
|
|
|
|
1) Read How to get an answer to your question
2) Write the code
only two letters away from being an asset
|
|
|
|
|
Read this first and try to start practice some code.
SSK.
|
|
|
|
|
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
|
|
|
|