|
i have a dropdownlist control in gridview edititemtemplate.
How to get the value of that dropdownlist control from edititemtemplate of the gridview so i can use update query to update selected value in database, when user click the update button in gridview
thanks in advance
|
|
|
|
|
use GridView1.FindControl() Methods.
cheers,
Abhijit
|
|
|
|
|
hi
how can i add/edit/delete/show value from database without page refresh in asp.net using c#.
I will do my best?
|
|
|
|
|
First download and install the ASP.Net Ajax Framework, after that just add an update panel on the page. Now add the controls inside the update panel (like you are creating a regular page). after adding all the controls and code for the controls. just change the Property of the Update Panel by Adding all the click events of all the 3 buttons as Triggers of Update Panel. and its done.
or you can search on google for "ASP.Net using AJAX UpdatePanel". Also there is very nice video tutorial on "ajax.asp.net". I suggest you to watch all the ajax videos on that web site.
|
|
|
|
|
Thanks your suggestion is good for me.
i used update panel and database fill properly but now one problem is create. problem is
i have a gridview in update panel and i set triggers. but i have some imagebuttons in gridview which are working on commandArgument but these are not working properly now? means click on these button nothing happen but without update panel its work properly.
I will do my best?
|
|
|
|
|
|
thanks for reply
as i mention that imagebutton within gridview not work now they clicked when i enter datagrid.itemcommand but not open panel before using update panel open a new panel than work.
I will do my best?
|
|
|
|
|
I want to use a render block inside of an html element in an aspx page,
asp.net,
for example ( <input value="<% varX %>" >;)
xxx
|
|
|
|
|
try this.
varX should be define in codebehiend as public
<input id="test" type="text" value="<%= varx%> />;
cheers,
Abhijit
|
|
|
|
|
Please do like below
]]>.
But it is always better write code in aspx.cs file.
Cheers!!
Brij
|
|
|
|
|
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
|
|
|
|