|
Hi guys,
we have a requirement of calling a web service to update some information in our clients db.
Now everything is working fine, but what if for some reason web service call fails?
call has to be realtime from web app for first time. In case of failure repetitive calls can be using any other service.
thanks
Keep DotNetting!!
GeekFromIndia
|
|
|
|
|
You can use AJAX framework to handle the exceptions from webservice.
Have a look at it[^].
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
how do i get the recently selected index of CheckBoxList.
say i have a CheckBoxList with 5 items and the first one is selected. I select the last item and i want the index of the last item i selected.
|
|
|
|
|
you can do one thing. just add selected index in a Collection Called Stack , [ in .NET there is Class Called Stack ]
and when you want to retreive the Recent selcted index , popuout the stack.
Hope you got it !!
cheers,
Abhijit
|
|
|
|
|
What about having a member integer variable and assigning it with the last selected index.
You will save the overhead of stack(push and pop)
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
Manas Bhardwaj wrote: What about having a member integer variable and assigning it with the last selected index.
How can i get the last selectedindex??
Alexei Rodriguez
|
|
|
|
|
AlexeiXX3 wrote: How can i get the last selectedindex??
Maite, with last SelectedIndex it means the SelectedIndex itself.
I hope you that it has property called SelectedIndex.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Just in case you didnt notice it, it is a checkboxlist not a dropdownlist or radiobuttonlist
Checkboxlist controls can have many selecteditems, and selectedindex wont always return the last selectedindex
Alexei Rodriguez
|
|
|
|
|
Abhijit Jana wrote: just add selected index in a Collection Called Stack
How can i get the last selectedindex??
Alexei Rodriguez
|
|
|
|
|
Im not sure if this is what you are asking
But if you wanna know what item was clicked and caused a postback
You need to have autopostback = true for the checkboxlist
'Get the object's full name
Dim x As String = Request.Form("__EVENTTARGET")
'Get only the value in case you are using values for each item
Dim Index As Integer = x.Substring(x.LastIndexOf("$"))
Alexei Rodriguez
|
|
|
|
|
|
I store the username of the users in session .I want to when the user click on the edit profile ,see own profile and can edit it(like phone,address,...) . when I read information of that user from database ,how should i show then to user ,where?
|
|
|
|
|
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hey
how to get the treeview selected path ?
thanks?
jooooo
|
|
|
|
|
Use recursion.
Sub AddNodeName(ByVal node As TreeNode, ByRef Path As StringBuilder)
If node.Level > 1 Then
AddNodeName(node.Parent, Path)
OrgText.Append("/") 'exchange / for whatever delimiter you want
End If
Path.Append(node.Text)
End Sub
|
|
|
|
|
can any1 tell me how to enable unique constraint on table in sql server 2005 ?
thanks in advance
|
|
|
|
|
Wrong Forum
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi ,
I want to clear all my session variables when the page terminates.
I tried page_unload , but then for every refresh (submit) of the page,
control goes to this function?
How I can have a function which only executes at the page termination?
regards
Vijay
|
|
|
|
|
vjvjvjvj wrote: I tried page_unload , but then for every refresh (submit) of the page,
control goes to this function
You haven't taken time to read the documentation. It explains what page_unload does and the behaviour you are getting is how it works.
vjvjvjvj wrote: How I can have a function which only executes at the page termination?
What do you meant by "page termination" ? When someone tries to close the browser ?
|
|
|
|
|
yes when the browser window for the page is closed, i want to clear the session variables for the form.
regards
Vijay
|
|
|
|
|
use Global.asax file , use Session_End() to Session Abandon. Call when you terminating the page.
Now, you can do it from you application easily, but how to do in Browser Close, there are some Trick. First try it. then I can help you
cheers,
Abhijit
|
|
|
|
|
Hi Abhijit,
I can not use session_end. I am not exiting my session. I am just terminating a page from my session and I want to find out where I can catch this.
I tried javascript onUnload but it goes there everytime the postback happens
regards
Vijay
|
|
|
|
|
vjvjvjvj wrote: I tried javascript onUnload but it goes there everytime the postback happens
yes , Page_unload Called on every post back.
use one condition to check clientX and clientY , it should be negative when you click [X] , File -> Close and Alt + 4 else it should be postive.
so just check that condition
Hope you have got my point.
cheers,
Abhijit
|
|
|
|
|
yes I got it.
Thanks Abhijit,
regards
Vijay
|
|
|
|