|
I read a lot of articals on net via google.
but none of them is about event handling of controls was created at runtime For example in for next loop.
'Creation Part<br />
Protected Sub btnCreateRuntimeButtons_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCreateRuntimeButtons.Click<br />
For i As Integer = 0 To CInt(txtNumberOfButtons.Text)<br />
Dim btn As New Button<br />
btn.Text = i.ToString()<br />
AddHandler btn.Click, AddressOf Me.btnClicked<br />
Panel1.Controls.Add(btn)<br />
Next<br />
End Sub<br />
<br />
'Event Part btnClicked event is never raised :'( i wanna die :'( <br />
Protected Sub btnClicked(ByVal sender As Object, ByVal e As EventArgs)<br />
Dim btn As button = CType(sender, button)<br />
Response.Write(btn.Text & "th button is clicked")<br />
End Sub
please help and run this code :'(
|
|
|
|
|
Are you reestablising the event handler on PostBack since this is a dynamically created control?
only two letters away from being an asset
|
|
|
|
|
do i have to add dynamic buttons to the page at each post back ?
WHY does ViewState property of placeholder Not Keeps my dynamic buttons?
I tried also panel, but it doesnt keep my dynamic buttons too.
|
|
|
|
|
Becuase the buttons are dynamic, you must re-connect the event handlers on postback
only two letters away from being an asset
|
|
|
|
|
i have a commonClass in application.
Public Class CommonClass<br />
Enum ShoppingType<br />
SavedBaskets = 0<br />
ShoppingListIDid = 1<br />
End Enum<br />
End Class
In aspx pages i code dim xST as CommonClass.ShoppingType
it works in local machine, but i upload files to ftp, it says Type CommonClass.ShoppingType is not defined
What is missing :S
|
|
|
|
|
Have you tried moving the Enum definition out of the class definition, then creating a member of that type?
|
|
|
|
|
hi,
Can we save image from excel file to database?
|
|
|
|
|
|
Hi,
Can any one suggest me how to read an block of content from an file and replace the content alone with new content using File concept in Asp.net??
For Eg:
.txtbold
{
font-family: Verdana;
font-size: 11px;
font-weight: bold;
color: #000000;
text-decoration: none;
}
.les10gests_txt
{
font-family: Verdana;
font-size: 11px;
font-weight: normal;
color: #ffffff;
text-decoration: none;
}
In the above, I want to read the content of .txtbold i.e font....to ....none; and also to replace this with new values if needed.
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
I noticed your earlier post and just thought I should mention that the CSS sits on the web server not the client machine so allowing one user to re-write it will affect all users. Dependant on circumstance I'd probably either look into something like isolated Storage[^] and maintaining a users preferences in XML format on the client machine, or having a limited set of pre-defined css 'styles' and allow users to choose which particular style is used to format the page when they view it.
Just my 2p
Rhys
I'm glad I'm not Brezhnev. Being the Russian leader in the Kremlin, you never know if someone's tape-recording what you say. Richard Nixon
|
|
|
|
|
Hi,
Here i am mentioning the admin as user. Coz we are creating an globalized web site can be adapted by many users with out chaning buy an designer or developer. We provide all opptions to the admin of the site to change the display
Know is Drop, Unknown is Ocean
|
|
|
|
|
how to create dynamic theme with asp.net 1.1 (vb.net)
thx
|
|
|
|
|
This link will help you. http://dotnetjunkies.com/WebLog/csteen/archive/2005/01/30/49164.aspx
Regards,
Thomas
|
|
|
|
|
there are also articles about just that subject here on CodeProject.
|
|
|
|
|
Hi,
I am Ravindra.Presently doing a project in asp.net.
I want to implement the process of sending auto email alerts using windows service.
So,please help me.
thanks in advance.
Ravindra
|
|
|
|
|
u can use sql server mailing services too .
|
|
|
|
|
You can set up a service that watches the event log, and sends out a periodic email when it changes on an interval.
|
|
|
|
|
Hi
i am using asp.net FileUpload control. But whenever i try to upload file, i can not get its name or any other thing. I receive no error, but controlName.HasFile is always false. Can someone tell me what could be possible problems with it?
regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
|
offcourse i did. my file control is something like this:
<asp:fileupload runat="server" id="getFile"
<div="" class="ForumSig">sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
Hi all,
I am trying to create an dynamic css using Asp.net. Is there any samples or tutorials to expalin that??
Thanks in advance
Bye
Know is Drop, Unknown is Ocean
|
|
|
|
|
HI
A Master page is a good location to declare a link to a Cascading Style Sheet (CSS). CSS is a feature of HTML, not ASP.NET 2.0, so the topic isn’t covered in depth. In short, a CSS contains formatting for various styles to be applied to pages and controls, so that when a page is rendered, the elements on a page, the style of the text, buttons, links, and so on, appear formatted according to the style definition in the CSS. A CSS also speeds page loading because the CSS is loaded just once by the browser, and then reused directly from the client-side cache for each subsequent page that uses that style sheet. On a Master page, you should include the following kind of link in the section to link a page with a CSS:
<title>My Web Site
best regards,
if you need more help please contact me on my MSN: jamilaboukhalil@hotmail.com
Jamil Abou Khlail
|
|
|
|
|
Hi,
Thanks for your replay. Actually I am trying to update an css file. Intially there will be certain properties, the user can put his own color, font like that from an Asp.Net application.
Know is Drop, Unknown is Ocean
|
|
|
|
|
Hello, I'm new to ASP.NET, so please be patient.
I need to have a download page that serves a Save As dialog when user clicks the button, but I don't know how to go about modifying the code I found on the internet.
<br />
Response.Clear()<br />
Response.AppendHeader("content-disposition", "attachment; filename=ap_06_fulldress.jpg")<br />
Response.ContentType = "text/plain"<br />
Response.WriteFile(Server.MapPath("/downloads/wallpapers/ap_06_fulldress.jpg"))<br />
Response.Flush()<br />
Response.End()<br />
I would like to pass filenames as variables to reuse the code as much as possible instead of having a function for each download, which would not be very efficient.
Any help appreciated. Thanks.
Jay
|
|
|
|
|
if you want to pass filename as variable than this would help
first sava your filename in variable like
string filename="/downloads/wallpapers/ap_06_fulldress.jpg";
now pass this variable in place of file like
Response.Clear()
Response.AppendHeader("content-disposition", "attachment; filename=ap_06_fulldress.jpg")
Response.ContentType = "text/plain"
/*** change ***/
Response.WriteFile(Server.MapPath(filename))
/*** ***/
Response.Flush()
Response.End()
In this way you can change the filename as u like just pass the filename in variable and the code will work...
viral
|
|
|
|