|
i have made a login form in which i had encrypted the username and password and stored it in the cookies . I am decrypting the cookies also.
NOW while testing i want to test if the user if disabled cookies then what will happen ? to start with i started with my comp . i deleted cookies folder in internet explorer internet settings . but by this only the cookies which are there get deleted. It does not stop the app to form cookies . So i went in security settings adjusted it to high . THen i opened privacy blocked both 1st party and 3rd party cookies . BUT then too the cookies are getting formed . ATlast i deleted all the folders cookies from my computer but one cookies folder i could not delete.
The problem is cookies are getting formed. I want to see that they are not formed and an error message is generated .
thanks in advance.
|
|
|
|
|
Use the Request.Browser.Cookies property.
|
|
|
|
|
please give me relevant codings.
thanks in advance.
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
{
if (!Request.Browser.Cookies)
{
ClientScript.RegisterStartupScript(typeof(this), "NoCookies", "<script>alert('Please enable cookies!')</script>");
}
}
|
|
|
|
|
How can i provide password protection in my "Sql Server 2000" database using Programming(ASP.NETP
Plz suggest me some tips
Manoj Bisht
|
|
|
|
|
be4 you store the passwords into a db
you have to encrypt them using any encryption approaches
try to use MD5
Amr Abdel-Mohsen Hafez
Software engineer
Cairo
E g y p t
|
|
|
|
|
Hi,
I've created a UserControl with some public properties that get exposed via the form tag on the aspx page. However I can't seem to get Eval and Bind to work with any properties on the control. I keep getting a compilation error "
Server tag not well formed<code>". Heres an example:<br />
<pre><code><uc1:MyUserControl ID="MyUserControl1" runat="server" MyPoperty="<%# Eval("ItemProperty") %>" />
Does anyone know how to get this to work on a UserControl? I've tried adding the BindableAttribute(true) directive to the properties but no luck.
Cheers,
Rory
-- modified at 8:14 Monday 23rd April, 2007
|
|
|
|
|
User Control Cannot support eval functions. so you can not user this is UserControl
rajeshprajapati
|
|
|
|
|
ISn't it DataBinder.Eval() ?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Yeah I keep seeing examples with that as well but I haven't bothered looking into why. Best guess is that was the .NET 1.1 way of doing it - I'm pretty sure just using Eval() or Bind() now does the same thing - I could be wrong. Either way I tried that as well and it didn't work.
It seems the same is also true of certain controls themselves, such as the Image control, you can't use any databinding expressions with that but you can with a Label control. Can someone explain what controls can have expressions and what ones can't? I can't see any obvious difference in the classes.
|
|
|
|
|
Just found this in our codebase...
<asp:CheckBox Runat="server" ID="cS" CssClass="Gensmalltext" Checked='<%#DataBinder.Eval(Container.DataItem, "Selected")%>' Tooltip="Mark Line for Adding" OnCheckedChanged="cS_CheckedChanged" AutoPostBack=True> </asp:CheckBox>
Try passing the Container.DataItem part and see what happens....
This link "explains" lol...
<a href="http://msdn2.microsoft.com/en-us/library/4hx47hfe.aspx">http://msdn2.microsoft.com/en-us/library/4hx47hfe.aspx</a>[<a href="http://msdn2.microsoft.com/en-us/library/4hx47hfe.aspx" target="_blank" title="New Window">^</a>]
This code binds to a dataset though, rather than a custom object...are you able to bind to a dataset?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Ah what an idiot! I had double quotes instead of single ones! How many times I've done that before I don't know...
|
|
|
|
|
Following is the code to clear all text boxes. But It won't be clear when the textbox is "Multiline".
Please give the solution as soon as possible.
function ClearTextBoxes()
{
for (i=0;i < document.Form1.elements.length;i++)
{
if (document.Form1.elements[i].type == "text")
document.Form1.elements[i].value="";
}
}
|
|
|
|
|
Please don't repost.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi,
While rendering to HTML, multiline textbox will be considered as text area. So if you can consider the same in the condition specified, then it will work fine
The code is given below
function ClearTextBoxes()
{
for (i=0;i < document.Form1.elements.length;i++)
{
if (document.Form1.elements[i].type == "text" ||document.Form1.elements[i].type == "textarea" )
{
document.Form1.elements[i].value="";
}
}
}
hope this will work for you
Rakheesh
|
|
|
|
|
Following is the code to clear all text boxes. But It won't be clear when the textbox is "Multiline".
Please give the solution as soon as possible.
function ClearTextBoxes()
{
for (i=0;i < document.Form1.elements.length;i++)
{
if (document.Form1.elements[i].type == "text")
document.Form1.elements[i].value="";
}
}
|
|
|
|
|
jayarajmrj wrote: But It won't be clear when the textbox is "Multiline".
you can use "textarea" in place of "text"
BTW please use same thread for the discussion it is just waste to create a new thread for the discussion of the same problem.
jayarajmrj wrote: Please give the solution as soon as possible
What do you think people here are bound to give you the solution, whoever is helping here are doing it in the free time. So asking to send the solution by marking "as soon as possible" seems to be offensive.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi Friends I am using following connection string it works fine from my Visual studio IDE, when I run web site from Visual studio.
<add name="myConnectionString" connectionstring="Data Source=SICLOPS;Initial Catalog=myDB;Integrated Security=true" providername="System.Data.SqlClient">
But when I deploy web site on my intranet IIS it gives following error.
System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Any solution please. urgent
|
|
|
|
|
You connection string did not come across because of the < > you need to check the box before you post that says Ignore HTML tags in this message.
Please repost with the connection string.
Ben
|
|
|
|
|
how do I do this from a button on an aspx form
|
|
|
|
|
Just redirect to the html file.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Just use Response.Redirect("abc.htm") on the button_click event in the aspx page.
Regards,
Satips.
|
|
|
|
|
I'd make the button plain HTML and do the redirect without bothering about a round trip.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
That depends on how you want to display the page.
To display it in an existing window (usually the current), set the location property of that window. Example:
window.location = 'AnotherPage.html';
If you want to display it in a new window, use the open method. Example:
window.open('AnotherPage.html', '_blank');
You can also specify a third parameter in the method containing settings for the window, like size and position.
---
single minded; short sighted; long gone;
|
|
|
|
|
what namespace or include do i need to use for the new window.
i.e. where is '_blank' defined?
|
|
|
|