|
|
|
|
Each site is different. You can automate some operations on your site, and do comparisons with the debug and release builds.
|
|
|
|
|
The Debug code give ideas as the site behaves... making easy the hacker work.
On performance issue, Debug code, the asp.net engine must to check the error, face the error against the asp.net error code table, and write a possible solution.
Release code just write a default error page. the second is fastest solution, but, its irrelevant over small sites.
keep Learning and you never will be out of date...
|
|
|
|
|
Hi,
I am trying to abandon the session which started at Login. When I click on Logout, I am redirected to the Login page, which is fine. The problem is, I can still type in the page address that I want in the address bar OR I can click "Back" on the browser and the pages of the site will load without authentication.
What am I doing wrong? Heres the code I have used:
FRONT END<br />
<br />
<pre><'asp:HyperLink runat="server" cssclass="STlvl2" navigateurl="?Logout=1" id="hlLogout">Logout/></pre><br />
CODE BEHIND<br />
<br />
<pre>If Request.QueryString("Logout") = "1" Then
Session.Abandon()
Response.Redirect("../frmLogin.aspx")
End If</pre><br />
<br />
<br />
-- modified at 10:31 Thursday 16th November, 2006
|
|
|
|
|
It may have been a typo, but why is there a ' in the hyperlink?
Also, why do you have a hyperlink that closes the session. Why not abandon the session in the button click event?
|
|
|
|
|
The ' in the hyperlink is so that the code is displayed on this page lol..
I dont actually have ' in my source code.
Secondly, I think I will try to abandon the session by using the btn.click event as you said through a link button. Maybe that will work.
Thanks for the idea mate.
|
|
|
|
|
Hello,
I am calling page2.aspx from Hyperlink field in Grid in page1.aspx and I pass to Page2.aspx 2 parameters. I would like to hide those parameters from the user.
I mean instead of http://MySite.com/page2.aspx?Param1=0&Param2=1
I would like to get http://MySite.com/page2.aspx and also send those 2 parameters to page2.aspx.
I know how to do it if it was not an hyperlink from a grid:
server.transfer "page2.aspx?Param1=0&Param2=1" and it works fine
Thanx
-- modified at 9:20 Thursday 16th November, 2006
Eric H.
|
|
|
|
|
Why not use session vars?
you can also change the hyperlinks to link buttons, then do your server.transfer there.
|
|
|
|
|
The true is that I pass ~20 parameters and I don't think that is a good idea to pass them through session vars.
You suggest to use the linkbutton.
Let me explain and simplify my problem,
I have a gridView with 2 columns: First column is an hyperlink of "item name" and the second column is the string containing "URL" for the first column. The second column is visible=false
The problem is that the URL string is very long and contain ~20 parameters. So when the user click on the link, we can see on the URL a long string, I would like to get the same action than I call to server.transfer.
Perhaps, you have got another idea.
Thanx
-- modified at 2:28 Friday 17th November, 2006
Eric H.
|
|
|
|
|
You can try something like this:
protected void GridView1_RowCreated(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.Footer)
{
LinkButton lnkbtn = new LinkButton();
lnkbtn.Text = "Add New";
lnkbtn.CommandName = "Add";
e.Row.Cells(0).Controls.Add(lnkbtn);
}
}
and on the aspx page change the gridview declaration to:
< asp:gridview id="GridView1" runat="server" onrowcreated="GridView1_RowCreated" >
</ asp:gridview >
|
|
|
|
|
Thanx I will try this
Eric H.
|
|
|
|
|
Guys i created a site with Visual Studio 2k5 over windows Xp, one form must create a folder inside the site root folder, this task is sucessfull on developed site, but i fired up a error when the site is running over W2k3. Could you Help me?...
keep Learning and you never will be out of date...
|
|
|
|
|
|
I think so
All the user have all the permissions, i can delete an object (picture) but i cant write a new picture at the same place, the same case with folders.
I using the fileupload control and the command SaveAs..
Any suggest.
-- modified at 11:45 Thursday 16th November, 2006
keep Learning and you never will be out of date...
|
|
|
|
|
Sounds like a create permission problem on the server (if server is Win 2003 the user is NETWORK SERVICE by default). You also may want to set it to create one level down from you website's root. Something like "mywebsite/uploads" or something like that.
Right-click a folder where you want the account to have write permission, choose "Properties" and then Security tab, add the account into user account list, and then set proper permissions to the account.
You may also want to look at impersonation.
|
|
|
|
|
Standard question #2:
What error message do you get?
---
b { font-weight: normal; }
|
|
|
|
|
I follow the Edboe suggest and finally, right now im creating folders over the server site, Thanks guys
keep Learning and you never will be out of date...
|
|
|
|
|
I have...
-formA (web form) it contains a listbox and pop up button
-formB (pop up window from formA) using window.showModalDialog in a javascript within a "script" tag in form A.aspx file, it contains two text boxes and submit button
what i want is to take two value of text boxes in formB
and use them to add a new list item (the first formB textbox value is the value of the list item and the second formB textbox value is the listitem's text) in formA listbox
how can i implement that?
Thanx in advance
Best Regards
3ala2
|
|
|
|
|
could i ask you why you do not want to use a session variable ??
whats wrong with this !!!!
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
because many things are related together, if u have read the details you would know ...
In other scenarios i might
first, it's not in one form, it's 2 forms parent and pop up
second, i want to access if from javascript
third, to get highest performance u need to reduce the sessions in ur app
hope u got me
Best Regards
3ala2
|
|
|
|
|
just3ala2 wrote: first, it's not in one form, it's 2 forms parent and pop up
so what?? the popup could be any page with.aspx
just3ala2 wrote: third, to get highest performance u need to reduce the sessions in ur app
they are just 2 variables !!!
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
can u reach the variable from both forms??!
and if u think like this, 2 variable * 1,000 user = 2,000 session opened with the server, that would exhaust the server
so what about 10,000 user
what would happen?
anyway, i implemented it by myself without using sessions
if u need the code tell
Best Regards
3ala2
|
|
|
|
|
Put the values in an array and assign the array to window.returnValue, then close the window. The array becomes the return value of the showModalDialog call.
---
b { font-weight: normal; }
|
|
|
|