findcontrol("PlaceHolderPrice") why why why why why why why why why why why



  • 1. secure textbox
    How would I let users input HTML in a textbox, while securing it from script attacks with ASP.NET + C#? Thanks, d.
  • 2. Session variable returns after deletion
    What code did you use to call your second window? "LKB" < XXXX@XXXXX.COM > wrote in message news: XXXX@XXXXX.COM ... > I've heard of session variables being lost, but I've got one that keeps coming back after I've deleted it. I'm using a session variable as a flag between a popup window and its parent window. The session variable is created in the popup window with a value of 100. The popup window is then closed. When this happens, a postback occurs in the parent window. In the Page Load function of the parent window, there is a check to see if the session variable is equal to 100. If it is, I save some data and set the session variable to 0. Then I delete the session variable using Session.Remove. I followed the values of the session variable in my debugger and it comes back as 0 and then Nothing as expected. > > The problem happens when I've finished with that and I click on another button. The Page Load function runs again and when it gets to the check for the session variable, it's still there, and it still equals 100, even though it was set to zero and then deleted. > > Is this behavior caused by my trying to modify a session variable that was created in a different window? Or is it something else? >
  • 3. Access custom objects from codebehind
    Hi, After using an assembly compiled into a DLL and added to the assembly cache for several months, we decided that it was too much trouble to maintain because of all the steps involved with every minor change (e.g. making the change, compiling, uploading the dll to the production server, opening vnc and running gacutil, etc...). I have 2 questions associated with the problem, and depending on the answers, we'll decide what's best: 1- Is there a way to unload the assembly from memory without restarting the server? From our experience, the only way we found for updating an assembly in the assembly cache is to restart the machine, otherwise, the assembly seems to stay in memory and the new dll file with the modifications is not taken into account. 2- If we move all the dll source code into a single .vb file, is there a way to access the classes from codebehind? <% Assembly src... %> does not seem to work for that, the classes being accessible only in the aspx page and not in the aspx.vb code... With the dll in the assembly cache, we only had to use Import statement. How do you do "Import" classes from a .vb file? Thanx for any useful infos! MAG
  • 4. Please Wait ... message
    Hi, I have a DataGrid report and filling that DataGrid takes time. How can I show a friendly "Please Wait ..." message during processing and hide it when I am showing the actual DataGrid? Could anyone refer me to a sample article related to that? Any help would be apprecited, Alan

findcontrol("PlaceHolderPrice") why why why why why why why why why why why

Postby Mr. SweatyFinger » Sun, 03 Dec 2006 16:56:44 GMT

why why why why why why why why why why why

Can't i get

dim PlaceHolderPrice as placeholder = 

<asp:FormView ID="FormView1" runat="server" DataKeyNames="AdNum" 
DefaultMode="Edit" DataSourceID="SqlDataSource1">




<table border="0" cellspacing="0" cellpadding="0" width="550" >

<asp:PlaceHolder ID="PlaceHolderPrice" runat="server" Visible="false">


<td style="width: 3px;" valign="top">


<td valign="top">



<td valign="top" width="10">


<td valign="top">

<asp:TextBox ID="PriceTextBox" runat="server" Text='<%# Bind("Price") 


<td width="10">







Re: findcontrol("PlaceHolderPrice") why why why why why why why why why why why

Postby Michael Nemtsev » Sun, 03 Dec 2006 21:00:51 GMT

Hello Mr. SweatyFinger,

The reason is that you can't get the control while you are not in the template 
As soon you EditItemTemplate will be active findcontrol returns you your 

M> why why why why why why why why why why why
M> Can't i get
M> dim PlaceHolderPrice as placeholder =
M> formview1.findcontrol("PlaceHolderPrice")
M> <asp:FormView ID="FormView1" runat="server" DataKeyNames="AdNum"
M> DefaultMode="Edit" DataSourceID="SqlDataSource1">
M> <EmptyDataTemplate>
M> </EmptyDataTemplate>
M> <EditItemTemplate>
M> <table border="0" cellspacing="0" cellpadding="0" width="550" >
M> <asp:PlaceHolder ID="PlaceHolderPrice" runat="server"
M> Visible="false">
M> <tr>
M> <td style="width: 3px;" valign="top">
M> </td>
M> <td valign="top">
M> Price:
M> </td>
M> <td valign="top" width="10">
M> $</td>
M> <td valign="top">
M> <asp:TextBox ID="PriceTextBox" runat="server" Text='<%# Bind("Price")
M> %>'></asp:TextBox>
M> <td width="10">
M>  </td>
M> </tr>
M> </asp:PlaceHolder>
M> </table>
M> </editItemTemplate>
M> </formview>
Michael  Nemtsev [C# MVP] :: blog:  http://www.**--****.com/ 

"At times one remains faithful to a cause only because its opponents do not 
cease to be insipid." (c) Friedrich Nietzsche

Re: findcontrol("PlaceHolderPrice") why why why why why why why why why why why

Postby Smokey Grindel » Mon, 04 Dec 2006 00:46:59 GMT

Step 1: Get an ASP.NET book, read and learn
Step 2: Learn to solve own problems with out being a baby and crying when 
you cant solve a simple problem, if you cant solve it still at that point 
then ask, don't run around calling people idiots because you didn't post 
detailed enough information that it takes people a while to figure out what 
the heck you were trying to ask...
Step 3: grow up

Similar Threads:

1.why why why why why

when i open a datasource, does the database get passed bfrom me to the 
server, and I have to sit and wait

why why why 

2.VWD why why why

Why when i save a page to the web does the whole app lock up?

Why can't I switch to another page while that page is saving?

3.why why why usercontrol

I have a usercontrol.
In the usercontrol i have a formview.
in the formview I have a dropdownlist with a sqldatasource

why why why why can't i referenct the sqldatasource from the codebehind?"

what gives??

4.why why why does function not work

I'm expecting this function to return the same value each time the page is 
hit within the same session:
In other words i want to save the guid as a session variable

Function TempImageGUID() As String

Dim _Temp As String

If Not (Session("TempGUID") Is Nothing) Then

_Temp = Session("TempGUID")


Session("TempGUID") = System.Guid.NewGuid().ToString()

_Temp = Session("TempGUID")

End If

Return _Temp

End Function

5.Why, why, why???


Can someone please tell me why my querystring isn't returning anything!

I have a called viewpage.aspx that contains a datagrid with the following 

<asp:hyperlinkcolumn DataNavigateUrlField="pageid" 
DataNavigateUrlFormatString="editor.aspx?id={0}" Text="<img border=0 
src=../images/edit.gif alt=Edit Page>">

When I run the code the id is sent to editor.aspx which is visable in the 
address bar so I know it is working. However when I try to request the 
querystring it returns rowID=0


Would appritiate any advice... thanks


 Private rowID As Integer = 1

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles MyBase.Load

        'Get Text for Editor
        If Not Page.IsPostBack Then
            rowID = CType(Request.QueryString(ID), Integer)
            FreeTextBox1.Text = GetDocument()
        End If

    End Sub 'Page_Load 
    Public Sub Button_Click(ByVal sender As Object, ByVal e As 
    End Sub 'Button_Click 

    Private Function GetDocument() As String
        Dim ds As DataSet = GetDataSet(("SELECT content FROM tblPageContent 
WHERE pageID=" + rowID.ToString()))
        Dim table As DataTable = ds.Tables(0)
        Dim row As DataRow = table.Rows(0)
        Dim doc As String = row("content").ToString()
        Return doc
    End Function 'GetDocument

6. why why why 7MB


8. Why oh why doesn't my data view work?

Return to ASP.NET


Who is online

Users browsing this forum: No registered users and 31 guest