|
Getting somewhere... it's *something* to do with replacing the user control DLL.
If I re-compile the user control and replace the one in the web root, the webpage no longer shows the object.
If I destroy the website and make it again, it works once more - and (as you might predict) if I rebuild the user control again, the webpage no longer shows it...
Any ideas why ???
|
|
|
|
|
You may try to delete the Download cache with the command gacutil /cdl , then launch the web page again in a new browser.
|
|
|
|
|
I found *a* solution to it late last night.
The behaviour (recompiled user controls vanishing) only occurs in the Visual Studio 2005 web server. If you create an IIS website and put the compiled user control there, it works.
Therefore (at this time) I can only deduce that the problem - if it is a problem - exists with the mini webserver built into VS2005.
Hope this helps somebody else one day...
|
|
|
|
|
|
I click on one particular link which goes to a particlar aspx page. However, sometimes I just get an about:blank page. I don't think it's spyware as I've tried it on different PC's!
|
|
|
|
|
breen25 wrote: However, sometimes I just get an about:blank page.
is it showing the right page sometimes???
Sushant Duggal.
|
|
|
|
|
|
|
I have a datagrid with a link button column.
By clicking on this link button, i want a modal dialog to be opened
hoooowwwww?
|
|
|
|
|
You may need to do the following steps:
+ Create an event handler for the ItemDataBound event of the datagrid control.
+ Get reference to the link button.
+ Add the handler for the client event onclick of the linkbutton using the Attributes collection with the Add method, in the handler you'd call to show up the modal dialog box.
You can find the sample code from the site datagridgirl[^].
|
|
|
|
|
Hi all,
I'm currently trying to add (with a button) rows into tables (html table, asp table or gridView) .
I've tried : (asp:Table)
Private Sub AddRow()
Dim count As Integer = procTable.Rows.Count //never increment !!!
Dim myRow As New TableRow
Dim myCell As New TableCell
myCell.Text = "myCell"
myRow.Cells.Add(myCell)
'this is the asp:Table
procTable.Rows.AddAt(count, myRow)
End Sub
Had anyone an idea???
Thanks a lot
ElpenS
-- modified at 10:26 Tuesday 4th July, 2006
ElpenS
|
|
|
|
|
Hi ElpenS,
I work in C#, so i can give u an idea , what i think about the problem.
In C# when we create a new row , we create a new row for the table.
i.e.
TableRow tr = procTable.newRow();
And then at last we add the row to the table.
procTable.Rows.Add(tr);
I hope it works,
Thanks
Sushant Duggal.
|
|
|
|
|
Thanks to you for your reply,
Unfortunatly, it doesn't works in VB.net.
procTable.newRow is not defined.
Will wait on further messages...
Have a nice day
ElpenS
|
|
|
|
|
I can't take it any longer... Can someone pleaseeeee help me. I have included my code below. I have searched everything and read many articles but I still don't get it. So please no reaction in the sense; you must create your controls in page_load, you must recreate your controls in the onpageinit, preserve viewstate, etc. because I have seen all those matters, many many times. My guess is that I just miss a tiny bit...
On a webform I have a placeholder and in codebehind this placeholder is filled with 2 dropdownlists and two buttons. The two lists are filled with data from a dbase. When a user clicks one button an item is transfered from one list to the other, vice versa. What happens in code below is that I have to click a button twice to have an item move. Actually the first time when I click the button the item is transfered but the list wont refresh, while I regenerate the listboxes in my on page init (i tried the on postback as well). When I do a response.redirect to the same page it works fine but that shouldn't be the way to go.
Imports System.Data.SqlClient
Imports System.Data
Partial Class Beheer_viewstate
Inherits System.Web.UI.Page
Dim bID As Integer
Sub Page_Init(ByVal s As Object, ByVal e As EventArgs) Handles MyBase.Init
Session("boekingID") = 105
bID = 105
dynamiccontent()
End Sub
Sub dynamiccontent()
Dim conn As New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("MyProvider"))
conn.Open()
'ongeboekte extras per reiziger
Dim get_boeker_ongeboekte_extras As New SqlCommand("get_boeker_ongeboekte_extras", conn)
get_boeker_ongeboekte_extras.CommandType = CommandType.StoredProcedure
get_boeker_ongeboekte_extras.Parameters.AddWithValue("@boekerID", bID)
get_boeker_ongeboekte_extras.Parameters.AddWithValue("@boekingID", Session("boekingID"))
Dim rdr_get_boeker_ongeboekte_extras As SqlDataReader = get_boeker_ongeboekte_extras.ExecuteReader()
Dim extras As New ListBox
extras.ID = "lbx_extras" & bID
extras.DataSource = rdr_get_boeker_ongeboekte_extras
extras.DataValueField = "extraID"
extras.DataTextField = "naam"
extras.EnableViewState = "true"
extras.DataBind()
rdr_get_boeker_ongeboekte_extras.Close()
'geboekte extras
Dim get_boeker_geboekte_extras As New SqlCommand("get_boeker_geboekte_extras", conn)
get_boeker_geboekte_extras.CommandType = CommandType.StoredProcedure
get_boeker_geboekte_extras.Parameters.AddWithValue("@boekingID", Session("boekingID"))
get_boeker_geboekte_extras.Parameters.AddWithValue("@boekerID", bID)
Dim rdr_get_boeker_geboekte_extras As SqlDataReader = get_boeker_geboekte_extras.ExecuteReader()
Dim gekozenextras As New ListBox
gekozenextras.ID = "lbx_gekozenextras" & bID
gekozenextras.DataSource = rdr_get_boeker_geboekte_extras
gekozenextras.DataValueField = "extraID"
gekozenextras.DataTextField = "naam"
gekozenextras.EnableViewState = "true"
gekozenextras.DataBind()
rdr_get_boeker_geboekte_extras.Close()
'knopje voor toevoegen
Dim extrastoevoegen As New Button
extrastoevoegen.CssClass = "btn"
extrastoevoegen.Text = "-->"
extrastoevoegen.EnableViewState = "true"
extrastoevoegen.CommandName = "myId"
extrastoevoegen.CommandArgument = bID
AddHandler extrastoevoegen.Command, AddressOf extrastoevoegen_Click
'knopje voor verwijderen
Dim extrasverwijderen As New Button
extrasverwijderen.CssClass = "btn"
extrasverwijderen.Text = "<--"
extrasverwijderen.EnableViewState = "true"
extrasverwijderen.CommandName = "myId"
extrasverwijderen.CommandArgument = bID
AddHandler extrasverwijderen.Command, AddressOf extrasverwijderen_Click
plh_reizigers.Controls.Add(extras)
plh_reizigers.Controls.Add(extrastoevoegen)
plh_reizigers.Controls.Add(extrasverwijderen)
plh_reizigers.Controls.Add(gekozenextras)
End Sub
Sub extrastoevoegen_Click(ByVal Sender As Object, ByVal e As CommandEventArgs)
Dim extrastoevoegen As Button = CType(Sender, Button)
Dim myId As String = extrastoevoegen.CommandArgument
Dim lbx As ListBox = FindControl("lbx_extras" & myId)
Dim conn As New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("MyProvider"))
conn.Open()
Dim set_boeker_extra As New SqlCommand("set_boeker_extra", conn)
set_boeker_extra.CommandType = CommandType.StoredProcedure
set_boeker_extra.Parameters.AddWithValue("@boekingID", Session("boekingID"))
set_boeker_extra.Parameters.AddWithValue("@extraID", lbx.SelectedValue)
set_boeker_extra.Parameters.AddWithValue("@boekerID", myId)
set_boeker_extra.ExecuteNonQuery()
conn.Close()
lbx.SelectedIndex = -1
End Sub
Sub extrasverwijderen_Click(ByVal Sender As Object, ByVal e As CommandEventArgs)
Dim extrasverwijderen As Button = CType(Sender, Button)
Dim myId As String = extrasverwijderen.CommandArgument
Dim lbx As ListBox = FindControl("lbx_gekozenextras" & myId)
Dim conn As New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("MyProvider"))
conn.Open()
Dim del_boeker_extra As New SqlCommand("del_boeker_extra", conn)
del_boeker_extra.CommandType = CommandType.StoredProcedure
del_boeker_extra.Parameters.AddWithValue("@boekingID", Session("boekingID"))
del_boeker_extra.Parameters.AddWithValue("@extraID", lbx.SelectedValue)
del_boeker_extra.Parameters.AddWithValue("@boekerID", myId)
del_boeker_extra.ExecuteNonQuery()
conn.Close()
lbx.SelectedIndex = -1
End Sub
End Class
|
|
|
|
|
andyk1967 wrote: My guess is that I just miss a tiny bit...
What you miss is the control life cycle, or more exactly the order of the events. You bind the datasource to the ListBox in the Page_Load event, and update the data base in the button Click event, and basically the Page_Load happens before the postback event such as the button's Click event. So the list does not reflect the updated data until you click the button again or call redirect in order for the data binding code to re-run. Here, in the buton click event handler, after you update database you simply run the code to bind the datasource to the LixtBox again to refresh the control.
|
|
|
|
|
Hi all,
Can any body tell me how to restrict the user without seeing source code of the page by right clicking the mouse on the page and select view source or from view menu of the menu bar. Thanks in advance.
Thanks and Regards
Venkat
|
|
|
|
|
add some javascript:
<br />
page.onmenu = "javascript: return false;"<br />
(BTW - removed in the above replaced "onmenu" that I typed)
should prevent the cm functioning at all. As for disabling particular items, doubt it's possible - Guffa? Ista? Anyone hehe?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
-- modified at 9:15 Tuesday 4th July, 2006
|
|
|
|
|
Thanks man. But can you explain me where i should this code Thanks in advance.
Thanks and Regards
Venkat
|
|
|
|
|
The short answer is: you can't.
Richard's trick is a good one, and will overwrite the default context menu that appears from a right-click on the page. However, the browser is considered to be owned exclusively by the user, not the page. As a result, no code on a page can interfere with the core functions of the browser. The "View-->Source" option of the browser's main menu bar will always be present. Also, a user can simply disable javascript (or use an add-on) to use the default context menu despite any scripting that you do to hide it.
At the end of the day, anything that you render to the browser can be viewed as source and there is nothing that you can do to prevent it. As a rule of thumb, I'd strongly recommend that you render nothing to the browser that you do not wish the general public to see.
--Jesse
|
|
|
|
|
"web server on this computer is not running"
iam getting error message while opening an webapp
plz let me know
plz let me know asap
with regards
d.ravi kiran reddy
|
|
|
|
|
Have you tried starting the web server?
|
|
|
|
|
But seriously. Is there a web server installed on your machine?
To check if IIS is there, click start > run > type inetmgr and hit enter. This should open up IIS admin page if it exists.
|
|
|
|
|
iam able to see the adminpage but iam not able to find the files which have been prevly there
with regards
d.ravi kiran reddy
|
|
|
|
|
hai,
still iam getting the same error message
plz let me know asap
|
|
|
|
|
Man, try adding a new virtual directory within IIS and pointing it at your website files, or possibly re-installing the app if you're still getting issues.
|
|
|
|