|
Thanks for reply.
It helps me, but not in my current scenrio.
*I want to add controls to placeholder when IsPostBack==True
I have this scenrio: one course can have many dates, and i am inteneded to save course info & dates info on single click event of button.
For that i want to put a placeholder control in the ajax update pannel, and a button to add text box to enter date in it, each time the button is clicked a one more text box should be addto that place holder, and previous text boxes should also retain there values selected by user.
And at the end when i click on save button, i want to get the values of textboxes in placeholder control.
Many Thanks & Best Regards,
Adnan
Many Thanks,
Adnan Rafiq
muhammadadnanrafiq@gmail.com
|
|
|
|
|
The following will do what you are after. It assumes you have a ASPX page with an UpdatePanel containing a PlaceHolder and a Button:
Partial Public Class _Default
Inherits System.Web.UI.Page
Private Property TextBoxCount() As Integer
Get
If ViewState("TextBoxCount") Is Nothing Then
ViewState("TextBoxCount") = 1
End If
Return CInt(ViewState("TextBoxCount"))
End Get
Set(ByVal value As Integer)
ViewState("TextBoxCount") = value
End Set
End Property
Protected Overrides Sub CreateChildControls()
MyBase.CreateChildControls()
For textBoxCounter As Integer = 1 To TextBoxCount
AddButton()
Next
End Sub
Private Sub AddButton()
Dim textBox As New TextBox
textBox.ID = "TextBox" + PlaceHolder1.Controls.Count.ToString
PlaceHolder1.Controls.Add(textBox)
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
AddButton()
TextBoxCount += 1
End Sub
End Class
I can send you the sample project if you want.
Cheers
Tom
|
|
|
|
|
greetings another wonderful day...
pls i need help on how to disabled control in asp.net 2003? im just new in asp.net2003 pls help..
i used dropdownlist selectindex
thanks
-- modified at 5:04 Friday 8th June, 2007
start a new beginning in every ending; thats what life for......
|
|
|
|
|
ControlName.Enabled = false;
|
|
|
|
|
Hi All,
I want to change the UpdateText of a CommandField(Edit) on runtime in GridView.
For eg:
Now my defalt edit command has UpdateText as Edit. based on a condition i have to change the text to 'Approve'.
kindly some one help me achieve this.
Thanks and Regards,
Biju S.
|
|
|
|
|
I have a dataview which when exported into excel shows in very small font. i want to apply style sheet before i export.
How do i do it?
Kindly help.
Thanks & Regards
Biju S
|
|
|
|
|
I have 2-3 dropdownlist and a button in updatepanel
button event fill dropdownlist with some data. Uptil here its fine but I don't know why it flicks!
I did the same thing somewhere else n it doesn't flicks there. Any idea what could be the problem.
Thanks
|
|
|
|
|
Even if you use normal JavaScript to load static items in Dropdownlist, the IE will flicker. Because Dropdownlist/Combo box is Windowed Control and the rendering would be different in IE. This is a bug in IE, which is fixed in IE 7.
So, there is nothing to panic... There is nothing wrong with the UpdatePanel too...
|
|
|
|
|
Thanks Venkatesh
you solved the mystry
|
|
|
|
|
Hi,
How to Export the data in the DataView into Excel sheet?
B'cos while binding my DataView into GridView control, I am showing only few columns values. So, the method: rendering the GridView control and Export it excel is NOT give me the desired result.
Anyone can pls help me in this?
Regards,
Jay
|
|
|
|
|
|
Hi..
Whenever I run an asp1.1 web application I got the error:
External component has thrown an exception.
Exception Details: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
and the source error show me one of the first lines of the page html code lines like the page directive element.
Could anyone help to solve this problem?
I am too late but i will never give up
|
|
|
|
|
This error is Caused because of the Unmanaged code,
The SEHException class also responds to the HRESULT E_FAIL, which has the value 0x80004005.
Do you got this value in ur error.
Regards,
Satips.
|
|
|
|
|
|
Thank you for your respond but the account Iam using to access these applications is an Administrator account and Iam running the applications localy so when I want to set permissions for the registry key the Allow check boxes are not visible because it is supposed that the administrators have all permissions on the computer.
I am too late but i will never give up
|
|
|
|
|
Satips wrote: Do you got this value in ur error.
Yes.
The strange thing is that this error occured whenever I run an asp.net 1.1 application.(even a simple project).
May you explain to me how to solve this problem?.
I am too late but i will never give up
|
|
|
|
|
TheEagle wrote: May you explain to me how to solve this problem?.
1. Start Registry Editor (Regedt32.exe).
2. Select the following key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC
3. On the Security menu, click Permissions.
4. Type the required permissions for the account that is accessing the Web page.
5. Quit Registry Editor.
Hope this will Solve your Problem.
Regards,
Satips.
|
|
|
|
|
Thank you for your respond but the account Iam using to access these applications is an Administrator account and Iam running the applications localy so when I want to set permissions for the registry key the Allow check boxes are not visible because it is supposed that the administrators have all permissions on the computer.
I am too late but i will never give up
|
|
|
|
|
Use asp.net with c# ...... Wat the code for print the web form? How to create print button ?
Thanks...
|
|
|
|
|
Why do you want to use asp.net and c#? The same can be done through javascript with window.print.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Go with Javascript that will be easy. Don't go with Asp.Net
Regards,
Satips.
|
|
|
|
|
hi friends
how to create
Remember me on this computer option in login in page
regards
saravanan
|
|
|
|
|
This is achieved by using a Persistent Cookie.
|
|
|
|
|
i was creating a new website project and got the eroor during loading
Unable to create the web Project WebApplication1
The file path c:\inetpub\wwwroot\webapplication1
doen not corespond to the URL
http:\\localhost\webapplication1
The two need to map the same server location
HTTP error 404 not found.
please help
|
|
|
|
|
When you open the .WebInfo file in c:\inetpub\wwwroot\webapplication1, where does it point to?
|
|
|
|