|
Hi All,
I create 2 controls dynamically - one textbox and one "Add" button.These controls are present in 2 different groups.If I click the button it should add a textbox to the textbox group. I need to create the textboxes based on the button click.
Any help would be appreciated.
vijaya
|
|
|
|
|
When you dynamically add the "Add" button, you can also add the event handler for the Click event to add the textbox at runtime. And you need to be careful when working with the dynamic controls as there two common mistakes that you may see: the dynamic controls get lost and the postback events do not execute.
How to: Add Controls to an ASP.NET Web Page Programmatically [^]
|
|
|
|
|
Hi
Thanks for Reply.
Actually my problem is Iam building two groups A and B.Each group contains one textbox and add button(all are builded dynamically).If i click on add button it should add textboxes to respective group.For add button click iam adding attributes and incrementing value from javascript using a hidden variable.
btnAddRange.Attributes.Add("onclick","javascript:submitVIN('"+GroupId+"')") this is code for click on a button.How can we identify click is performed on respective group.
Regards,
Vijaya
vijaya
|
|
|
|
|
Do you mean you want to determine which button is firing the event? and you might want to do that at the client side or the server side?
|
|
|
|
|
Hi,
Thanks for your reply.
Sorry for delay in reply.
My Problem was solved.
I have one more Problem regarding this dynamic creation of controls.
Delete option is there to delete respective row which is added by click on the add button.Iam using Request.form to read the values and save in to database.After clicking delete button ,Iam deleting that row value from database but page was loading values using request.form(control) but i need controls should load values from database.
Pls Help me,My project was in delivery stage pls reply me as soon as possible.And Thanks for help.
Thanks & Regards,
Vijaya.K
vijaya
|
|
|
|
|
Not sure about what your code is doing, but IMO you can simply refresh the control with the data in DB after you delete the row. In other words, you can have put your code somewhere else to set the control value, and this basically happens after the row is deleted.
|
|
|
|
|
Hi friends,
I saved some text with html tags, now i want to show that text in a grid column,
it shows those all teags too, is there any possibility that I could show html formatted text in the gridview coloumn?
any help will be appriciated.
Naveed Kamboh
|
|
|
|
|
I have sorted that
i used property htmlencode=false and it worked for me.
thanks
-- modified at 16:44 Monday 4th September, 2006
Naveed Kamboh
|
|
|
|
|
hi all
i hv created a dynamic page in which the controls are created according to data from a database these controls are radiobutton and checkbutton lists. i want to validate the user to check a fixed number of boxes in each list and also assure that the user checked a radiobutton in each RadioButtonList
abdelhameed81
|
|
|
|
|
+ To validate the number of boxes that the user checks you can use a custom validator or implement it on your own script.
+ To validate if the user checks a radiobutton in the list, you simply add the RequireFieldValidator to validate the RadioButtonList control.
|
|
|
|
|
the controls are creaeted in run time how do i access them
abdelhameed81
|
|
|
|
|
|
hi
This is a problem i came across while developing a project. My problem is to get the total of a datagrid column in a data grid control in ASP.Net with VB code.
If anybody can help me with finding this piece of code i ll be much greatfull
|
|
|
|
|
There are a couple of ways to do this common thing:
+ You can populate the total value based on the datasource bound to the control.
+ You can populate this value using the ItemDataBound event of the datagrid control.
You can find the sample code from the site[^].
|
|
|
|
|
Sir,
I am deleting the record in the datagrid but before deleting the row i want to send the request like 'are u sure u want to delete the record' .I mean i want two buttons Ok and cancel if ok is pressed it deletes the row otherwise row will not be deleted and for that i don't want to use another web form and want java script tools .Can i use these things in vb code behind file . Please help how to solve this problem.
Thanks
|
|
|
|
|
Hi,
IMO,You just simply use the js statement window.confirm(...) ...
<< >>
|
|
|
|
|
Use this java script,
if ( ! confirm( 'Do you want to delete primay contact'))
OR
If you want to do on the server side only then go through this link,
http://www.codeproject.com/aspnet/NingLiangSimpleControl.asp
Ram
|
|
|
|
|
hi all,
how to use the ajax with asp.net 2.0.what step should be follow to when i select a dropdown list (autopostback property is true) then whole page is getting refresh. please give me some idea how to use ajax .
thanks in advance
thanks n Regards,
Srinandan
-- modified at 9:20 Monday 4th September, 2006
|
|
|
|
|
it's completely clear that the page get refreshed as you set autopostback is true, why dont you try to set it to false???
<< >>
|
|
|
|
|
Have you looked at some sample code of an Ajax library or Atlas available out there? This is a common example that I can easily find in lots of the Ajax-style libraries.
|
|
|
|
|
I get this error:
Server object, ASP 0177 (0x800401F3)
Invalid class string
on this line
session("msg") = ""
set aspObj = server.CreateObject("asp.dataaccess")
session("UserName") = Request.Form("username")
|
|
|
|
|
Boboza wrote: session("msg") = ""
set aspObj = server.CreateObject("asp.dataaccess")
session("UserName") = Request.Form("username")
The bolded part above is the "class string" and this is invalid. In order to use Server.CreateObject in classic ASP a com dll had to be registered on the webserver using regsvr32 utility.
|
|
|
|
|
hi J4amieC,
where can i get this com dll?
|
|
|
|
|
I've no idea! Where did you get the snippet of code from?
|
|
|
|
|
Hi All,
I have created datagrid with hyperlink column and it work fine.My problem is, i want to pass 3 parameters at the same time from the hyperlink column to another page.can anybody help me with this?
Thanks!
Pradeep Reddy
|
|
|
|