|
Hi there,
IMHO, you can use the setTimeout/setInterval methods to implement the client side timer, then once after a specified period of time, a custom client side function is called and you can use it to update the DB with ClientCallback. You can easily find the exampples of these two functions out there.
|
|
|
|
|
Thanks a bunch for your help, though Im still a little confused
I have my connection strings stored in web.config for the data access layer to deal with, and don't like the idea of accessing database directly from a javascript... I was hoping to be able to do yet another callback for that purpose(you know, like going through RaiseCallbackEvent and GetCallbackResult again). But in order to do that I had to wire that particular javascript to a specific control's Attribute collection (this.someControl.Attributes.Add("", "")...
Would you happen to know of a good article or two that may shed some light? Thank you so much
Nila Fridley
|
|
|
|
|
I took your advise and looked around; after putting together parts of other people's solutions I finally was able to get it right. Turns out I had to provide yet another callbackEventReference (with a function named Release(arg, context)) that would tell my server to do something, and I called that function from within the timer function... long story short, it worked and Im super happy
Nila Fridley
|
|
|
|
|
Hi i have a compare validator to validate a date field:
<asp:comparevalidator id="CompareValidator1" runat="server" type="Date" operator="DataTypeCheck" controltovalidate="txtDateOfOrder" errormessage="Please enter a proper date">
If i enter the date in the dd/MM/yyyy format the validator throws the error message as it wants the date to be in the MM/dd/yyyy format.
I want an dd/MM/yyyy format to be entered in my textfield.
my web.config has:
<globalization fileencoding="utf-8" requestencoding="utf-8" responseencoding="utf-8" culture="en-US" uiculture="en-US">
How can i make the validator to accept dd/MM/yyyy format????
Thank,
Sanded
|
|
|
|
|
I think your validation expression should read something like this:
\d{2}/\d{2}/\d{4}
but then again, this would also apply to mm/dd/yyyy...
why don't you use the CustomValidator control? that way you can write it the way you want it.
Nila Fridley
|
|
|
|
|
|
Hi ,
I am accessing certain files on run time in ASP.net.
How to check if the file exist or not on the server.
Thanks in Advance.
Deepak Surana
|
|
|
|
|
System.IO.File.Exists(Server.MapPath("..\Reports\XML\FileName.txt")) Return's a Boolean
|
|
|
|
|
hai all,
my doubt is something abt Javascript .
in my webform i ve a datagrid with in that datagrid i ve two textbox in the 1st and 3rd column.
how i retrive its value in a javascript .
i know to take value of a cell in the datagrid using javascript.
document.getElementById("dgQtion").rows(1).cells(5).innerText
how i take the value of a textbox in first row cells(1)?
OR
i am using vb.net.i want to pass its value(textbox inside datagrid) to a javascript function.
i know to pass the value of a cell in the datagrid to javascript.
in itemdatabound event i can take the value of a textbox which is inthe datagrid.
CType(e.Item.FindControl("TxtRate"), TextBox).Attributes.Add("onKeyUp", "javascript: return calculate(this.value," & e.Item.Cells(0).Text & ");")
instead of e.Item.Cells(0).Text i want to pass the value of a textbox, which is inside the datagrid , to javascript function calculate.
any solution is appreciatable.
tahnks in advance
All I ever wanted is what others have....
CrazySanker
|
|
|
|
|
+ The simple way to know the id of the textbox at the client side is to view source the web page. Or you may want to look at the ClientID property from the server side code.
+ Also, to pass the value of the TextBox from the server side, you first need to get reference to the TextBox control like you are doing in the ItemDataBound, then you simply access the Text property of the control.
|
|
|
|
|
hi there ,
I'm a beginner in programming using ASp and vb.net and sql server 2000 and I'm facing a problem of how to store and retrive the image from ms sql server databse , I need to know the following things :
1.using html file feild control in asp how do I code on submit button so the specified file will be stored in database as well as in some specified folder for a particular entry .
2.how do i retrive this image from my database and view I require the query .
I need help so who can help i will be very thankful to him|her.
S.Mohamed Radhi
|
|
|
|
|
|
I have seen this link before but i'm still unable to code that could you plz send me the link of another example based on vb.net if you can I would be very thankful to you
|
|
|
|
|
If you can't read this example and use it for your code then another won't do you any good either.
only two letters away from being an asset
|
|
|
|
|
Greetings!!!
I have a problem, my web aplication has a Master Page and other page what inherits from the master page. The Master page has a treeview control and a herder. When a choose an option in a node from the treeview it displays the page but the postback appears in the selected page y also in the master page, and then the state of the treeview dissapears.
Waht can i do for avoid the postbak in the master page?
DIEGO
|
|
|
|
|
remove the MyBase.OnLoad from the MasterPages's VB File, if its not being used.
|
|
|
|
|
Ok, it would be a solution, but in the Load event there is the code for loading the treeview, if i use Atlas for ASP.NET ?
Thanks
|
|
|
|
|
I apoligize. I'm not familiar with Atlas for ASP.NET. I'll reasearch my responses better next time.
|
|
|
|
|
Ok, no problem and Thank you for your help.
|
|
|
|
|
Hey AreJay,
Try to implement client callback-enabled type tree view so that you wouldn't need to post back each time you select a node... AND you can find one right out of the box at this website!
http://www.obout.com
-Nila
Nila Fridley
|
|
|
|
|
Rhlye wrote: Waht can i do for avoid the postbak in the master page?
The MasterPage in its nature is a user control which is then combined with the content page to produce the entire web page. So when a postback occurs, the whole web page is reloaded including the contents, header and the treeview control in the masterpage. In this case, if you only want to reload the contents, but the master page part, you may have a couple of options which you can consider:
+ Use frame (or iframe) like you see the online MSDN library web site.
+ Use Atlas (or Ajax in general) to dynamically load the output markup of the content web page only, then attach it to the current document at the client side.
|
|
|
|
|
Hi there
I'm working whit Visual Studio 2005 developing an ASP.NET 2.0 WebPage
I have a DropDownList Control with 2 options to select. I want to generate a validation message according to the selection made in the DropDownList Control. Any ideas???
THANX ¡¡
|
|
|
|
|
Server-side or client-side?
|
|
|
|
|
|
<br />
Sub DropDownList_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles DropDownList.SelectedIndexChanged<br />
Dim script As String = ""<br />
Dim ctrl As DropDownList = CType(sender, DropDownList)<br />
If ctrl.SelectedValue = "something" Then<br />
' Some Kinda Validation occurs<br />
script = "alert('This is what was selected: " & ctrl.SelectedValue & "');"<br />
Else<br />
' Some Kinda Validation occurs<br />
script = "alert('This is what was selected: " & ctrl.SelectedValue & "');"<br />
End If<br />
Me.ClientScript.RegisterClientScriptBlock(Me.GetType, "Alert", script, True)<br />
End Sub<br />
Is this what you had in mind?
|
|
|
|