|
Whenever you want to password protect a page, just put a condition at the begining of that page.
Save all the usernames and passwords in a database (say in a table called 'visitors'). Each time a user logs in check if the passwords he enters (you can also use a cookie) matches the one in your database.
If it does just use a flag in his session that enables him to get in the site. Else, just redirect him to a page saying "wrong password".
<br />
if session("access") = "no" then<br />
response.redirect "access_denied.asp"<br />
Isaac
|
|
|
|
|
hi all,
how can i pass id along with wndow.open()
vipin
|
|
|
|
|
plz let me know wht actually u wanna do
Any systematic work reflects its significance for a long time, Though I m not totally against "The Prototyping".So let's discuss in depth...
|
|
|
|
|
if you want to open any page dynamically, create a function in javascript with page name as parameter.
Any systematic work reflects its significance for a long time, Though I m not totally against "The Prototyping".So let's discuss in depth...
|
|
|
|
|
use query strings:
<br />
window.open("pagename.aspx?id=yourid",null,<br />
"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");<br />
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
thank u for this reply
here "yourid" may be a text value??
window.open("pagename.aspx?id=documnet.form1.txtno.value",null,
"height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
is it possible??
vipin
|
|
|
|
|
Hello Dears,
I have written a code to insert record in to DB(SQL SERVER), Its working fine.
The problem is - some time the records are getting duplicates,
How to avoid this kind of problem?
Why such a kind of problem cause?
Thanks
N.Rajakumar B.E.,
Application Developer,
|
|
|
|
|
in case you are implementing a postback event handler and your insertion code is present in the handler, then when you refresh the page immediately after you have made a postback for insertion , the same process will occur again, causing the isnertion code to be invoked. There are lot of ways to get around the problem, some are
1.In your commit handler, check whether it is a refresh or a genuine commit.
2.Implement the insertion in a stored proc where you can place checks to see if the data exists
|
|
|
|
|
The most probable reason for this is that the code actually is executed twice. This can be from users double clicking the submit button, or from an error in your code.
---
b { font-weight: normal; }
|
|
|
|
|
What initiates the insert? Is it the end user clicking a button? If so, the problem might be from impatient users clicking twice. Try disabling the button using javascript before submitting the page. This will not let them click it again, causing a second insert.
Michael Flanakin
Web Log
|
|
|
|
|
hi all,
i have asp page with repeater in it, inside repeater i have a hidden field a text field and some td's with just text.
i want to be able to access the updated text from each row of the repeater when a user clicks submit button. it appears that these values are not appearing at postback but the repeater row controls are recreated on postback and viewstate restored to them
if i have 2 in my textbox and type 3 then submit, when stepping through debug i get value 2 not 3.
can anyone provide a solution or alternative please? surely something like this is possible, i just cannot find anything googling or in my books
kind reagards,
g00fy
|
|
|
|
|
How can I check when Webbrosercontrol (VS 2005) has loaded the Page completely?
IsBusy and the ControlState(Completed, Loading, Loaded ... the enum) - doesn't work
|
|
|
|
|
how to insert a picture uploaded from web page into a database table
i can store the pic path but but not the picture
MughalTheBest
|
|
|
|
|
Images can be stored in DB in the form of a BLOB. One way is to do it this way, have a inputfile control in your aspx page through whoch you can browse the image to upload. Then in the code behind block , u can do something like this
Dim imgStream As Stream = UploadFile.PostedFile.InputStream
Dim imgLen As Integer = UploadFile.PostedFile.ContentLength
Dim imgContentType As String = UploadFile.PostedFile.ContentType
Dim imgBinaryData() As Byte = New Byte(imgLen) {}
imgStream.Read(imgBinaryData, 0, imgLen)
in the insertion code, set a SqlParameter like this
Dim imgParam As SqlParameter = New SqlParameter("@Photo_Data", SqlDbType.Image)
imgParam.Value = ImgBinaryData
|
|
|
|
|
;)But what if i m using jsp or java to store the image to database can u have any idea what to do..
Lack:coder:
|
|
|
|
|
it has to be possible to do it using java or jsp too ~ SQL has a built in data type called image ~ stores images in binary form ~ what is usually called a BLOB ~ if u can get the input image to be converted to a byte array then it is possible to get it into SQL ~ i have never worked in jsp or java so i cant tell you how
|
|
|
|
|
Try this link, I think this is what you are looking for. If not let me know
link[^]
Brian Van Beek
Inside this room, all of my dreams become realities, and some of my realities become dreams. -Willy Wonka
Just started a new blog, yeah! [^]
|
|
|
|
|
Friends,
Some of the items in my listbox(Select box in html) are too big to display. Can I have a tooltip that displays the same text when I move over it? If so, how?
Any help or suggestions would be appriciate.
Thanks & Regards,
Shiby
|
|
|
|
|
This is a problem i agree. I faced same problem a while ago.
I do not have any idea how to add a tooltip to the list, and would appriciate if any body has that solution.
For my application what i did was - remove the width of the control and thus in turn the control takes the width of the broadest item in the list. In order not to mess the rest of the UI, do not place any other control in same horizontal line with this one.
Like it or not - Live with it. (was my attitude due to time constraints.)
Ketty
|
|
|
|
|
Hi,
My javascript onclick is not working for firefox, how can i make it work?
like
RadioMain.Attributes.Add("onClick","alert()");
its working in IE but not firefox
thanks in advance
viks
|
|
|
|
|
RadioMain.addEventListener("click", function(event) { alert(); }, false);
Reference[^]
|
|
|
|
|
Thanks for your reply
Actually My problem is that I am creating radioButton dynamically from xml file so I cannot use Attributes.Add in codebehind
I can write a function and adding it in XML file so it gives output like
<asp:radiobutton id="RadioButton1" onlick="toggleT(id1,h)" runat="server">
where my function is toggleT which is written in javascript file.
function toggleT(_w,_h) {
if (document.all) { // is IE
if (_h=='s') eval("document.all."+_w+".style.visibility='visible';");
if (_h=='h') eval("document.all."+_w+".style.visibility='hidden';");
} else { // is NS?
if (_h=='s') eval("document.layers['"+_w+"'].visibility='show';");
if (_h=='h') eval("document.layers['"+_w+"'].visibility='hide';");
}
}
this is working fine in IE but not in firefox and message in JavaScript console is not clear as it is not statisfying any of if condition so whatever i am putting in last it goes there.
Any suggestion will be great
Thanks
viks
|
|
|
|
|
Actually my mistake was using document.all when I am using document.getElementById its working fine in firefox
Thanks
Viks
|
|
|
|
|
Hi,
I"m writing a page in asp. When the user presses on Submit the form is passed by Post to a url in a different site.
The problem is that i want to do this action in script, meaning call a function which will call the url and pass the form by Post.
There are :
Server.Transfer - passes only to a page in the same site, so no good for me.
Response.Redirect - Doesnt pass and form or query parameters so no good for me again
So how will i do this?
Thanks in advance
Goldwind
|
|
|
|
|
I think You can use the following,
document.FormName.action="Your URL"
document.FormName.submit()
N.Rajakumar B.E.,
Application Developer,
|
|
|
|