as in, asp:div? Doesn't work this way, what you probably want to do is div runat="server", then you can access it from server side.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
No, I know that div doent belong to the asp element, what I am saying is I tried to add a <asp:Button runat="server" id = "My button" ect.../> to a <div id="myDiv" runat="server"> </div> in the code behind, but that doent work, the button must be generated dynamically, so I would rather use Button myBut = new Button(); The Div contains html content (a bunch of text, img ect tags) at certain tags that have words like "design" i want to place these buttons to enable keyword navigatyion
Say I declare a button like that it doens't even display. I believe becuase it needs to be declared as in Button mybut = new Button and then u must use a addControll method of the div u marked as runat server, and that works 100 now I need to place it in a secific location, say if the div has content words like "design", "technical" I want to replace those words with a button and link them to other pages on the site.
If you just want to replace them with a navigational link or button (I'd highly recomend hyperlinks over buttons for navigation!) you would be better to parse the html content of the div and replace those keywords with an html link.
The only way I know how to get ASP controls at specific locations is to use placeholder controls.
Yes thought about it but my navigation works by setting a session[PageID] and then using that to set the page content so I can use ASP.Net AJAX for my navigation to avoid postbacks. for my axaj I use the telerik rad Ajax controll its kickass and totaly codeless, you can check it out at www.telerik.com
But thanx anyway but what I need to do is everythink to be done server side, Absolutely no .js files or script tags in my .aspx file.
Le Roux Viljoen
PCW New Media
I am investigating how to port my C++ MFC application with OpenGL to a web-application.
Searching the internet leads to many keywords, like plugins/ActiveX, X3D, OpenGL ch, Ajax3D and more.
I am completely unexperienced to web-programming, but I am willing to learn and apply this.
Can anybody advise me what could be a good direction?
I have a simple question. If you are using the latest versions of Firefox and IE, can you use an image for a border on div or table elements? I would like to have a shadow that is defined in the CSS file that does not require placing another object behind the element that is to cast the shadow.
You can't use an image for the border in the sense of border:url(border-image.png);. Best way is to use a background image for a shadow. Add a bottom and left/right (depending on direction of shadow) padding for the width of the shadow and add it as the background image (the padding is so any the element content won't appear over the shadow). This is easiest when your element has a fixed width.
I have a simple form with a data grid, I try to populate teh datagrid with a proces similar to the following:
Dim sqlStatement As String<br />
sqlStatement = "Select systemName, LotID from tblStatusLot "<br />
Dim cmd As New SqlCommand(sqlStatement, cn)<br />
Dim dr As SqlDataReader = cmd.ExecuteReader<br />
Do While dr.Read()<br />
MyDataRow = dt.NewRow()<br />
MyDataRow(0) = dr.GetString(0)<br />
MyDataRow(1) = dr.GetString(1)<br />
Dim dv As New DataView(dt)<br />
DataGrid1.DataSource = dv<br />
This seems to work fine, the question I have now is how do I go about allowing the user to scroll through is there are more than the 10 records (pageSize is set to 10, AllowPaging and Allow Custom paging are on) The problem is I am not sure how to use this control, but you need to start someplace.....
Help has an example, but they do not use a SQL data set. If someone has a simple example that would be great.
I need to know the node that fires the "onNodeCheckChanged" event, when the user checks more than one node, in other words, I need to know the order in which the user checks the nodes so that I wanna keep the check on the last node he checked..
My code is as below :
if (lbl == "Valid")
var lbl1="<%= str1 %>";
alert("Bio-metrics have not been done");
Can anybody please tell me how to do it. Thank you.
Hi guys, I need someone who is quite an expert to help me with this one.
I set up a database that reads content (In html code string) into a div on my site. the div I set to runat server;
the htmlCode I get from the Database is then put into the InnerHTML of the Div. Now I have set a method that creates a controll out of the keyword htmlCode = htmlCode.Replace("//KeyWord","//ASP.NET Button");
The problem I get that the ASPButton displays on the htmlCode string but doesnt show in the div ?
Please help .
Last Visit: 31-Dec-99 18:00 Last Update: 25-Sep-23 21:15