|
|
right answer
also 'amount' should be the 'id' of hidden type input not name.
|
|
|
|
|
The control doesnt work, i dont know why, i cant login, even when i retrieve the password.
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http:
-->
<configuration>
<system.net>
<mailSettings>
<smtp from="makovetskiyd@yahoo.co.uk">
<network host="smtp.gmail.com" enableSsl="true" defaultCredentials="false" port="587" userName="yourguru27@gmail.com" password="luckyd55"/>
</smtp>
</mailSettings>
</system.net>
<connectionStrings>
<add name="YourGuruDB" connectionString="Data Source=DIMA-00AA1DA557;Initial Catalog=model;Integrated Security=True"/>
<add name="modelConnectionString" connectionString="Data Source=DIMA-00AA1DA557;Initial Catalog=model;Integrated Security=True" providerName="System.Data.SqlClient"/>
<add name="LocalSqlServer2" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename='D:\Documents and Settings\Dima\My Documents\Visual Studio 2010\WebSites\WebSite10\App_Data\ASPNETDB.MDF';Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<membership defaultProvider="MyMembershipProvider">
<providers>
<clear/>
<add
name="MyMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="LocalSqlServer"
minRequiredPasswordLength="2"
minRequiredNonalphanumericCharacters="0"
maxInvalidPasswordAttempts="1000"
passwordAttemptWindow="1000"
applicationName="/WebSite10"
/>
</providers>
</membership>
<roleManager enabled="true" />
<authentication mode="Forms">
<forms name="MyAppCookie"
loginUrl="~/Registration.aspx"
protection="All"
timeout="43200"
requireSSL="false"
slidingExpiration="true"
cookieless="UseCookies"
enableCrossAppRedirects="false"
path="/" />
</authentication>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
</system.web>
</configuration>
The above is web.config. i have no idea what to correct. Some said that i need to pass the connection string to the membership provider config. I tried it and it made no
difference. Yesterday, it worked, but today it stopped working, no idea why .
Other things that i checked:
I havent locked myself out...
|
|
|
|
|
connectionStringName="LocalSqlServer"
This will refer to the entry in the machine.config file for the system it is running on since you did not define it in the current web.config file. Check there.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I tried to connect with a new password and couldnt, it doesnt let me in!!
I used CCleaner to clean everything today,,may be it deleted my cookie, but isnt a new cookie being allocated. whats the problem!!?
|
|
|
|
|
It is not a cookie issue. What even makes you think it is?
If the MembershipProvider is not using the correct database it doesn't matter how many times you change your password it still won't work.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I need replace a selected word in the text of textBox not all text
I can´t use SelectedText or SelectionLength like windows Form in asp.net and I do not know what that word is selected....
|
|
|
|
|
|
You can use String.Replace. Like,
myString = "This is a test.";
myString = Regex.Replace(myString, " is", " was");
|
|
|
|
|
the question is I do not know that word is selected.
|
|
|
|
|
Good Evening All
i have another Question. i have created a Function that creates a Cookie with a Domain like this
private static void SetCookieExtedend(String key, String value, String path)
{
DateTime expires = DateTime.UtcNow + TimeSpan.FromDays(2000);
bool secure = false;
String domain = "Ecash";
StringBuilder cookie = new StringBuilder();
cookie.Append(String.Concat(key, "=", value));
if (expires != null)
{
cookie.Append(String.Concat(";expires=", expires.ToString("R")));
}
if (!String.IsNullOrEmpty(path))
{
cookie.Append(String.Concat(";path=", path));
}
if (!String.IsNullOrEmpty(domain))
{
cookie.Append(String.Concat(";domain=", domain));
}
if (secure)
{
cookie.Append(";secure");
}
HtmlPage.Document.SetProperty("cookie", cookie.ToString());
}
and its working well , i have set the Cookie and it was stored as this
UserID=142;expires=Mon, 14 Nov 2016 16:58:19 GMT;domain=Ecash
now i want to retrieve the Value of the Cookie and i have a function that does it like this
public static string GetCookie(string key)
{
string[] cookies = HtmlPage.Document.Cookies.Split(';');
key += '=';
foreach (string cookie in cookies)
{
string cookieStr = cookie.Trim();
if (cookieStr.StartsWith(key, StringComparison.OrdinalIgnoreCase))
{
string[] vals = cookieStr.Split('=');
if (vals.Length >= 2)
{
return vals[1];
}
return string.Empty;
}
}
return null;
}
the Following Line comes back with an empty String
string[] cookies = HtmlPage.Document.Cookies.Split(';');
Why ?
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Why are you not using the HTTPCookie[^] class?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi all,
I have a log table of my website in which we are maintains the log of the users.
I want to export data of this table in excel format.for this I made an SP(store procedure)in which I pass the date range and
according to date range I was able to generate the excel file.
Now I want to export data with multiple sheets with different information.
so please give me some hints/code by which I can export the data in the multiple sheets
thanks........
|
|
|
|
|
|
thanks for giving reply.
actually I am generating excel file by sql (store Procedure)with out using dot net code.
because I have to attached this file in the mail of web administrator.the mail will go each first day of the week/month.
by sql job
|
|
|
|
|
Hi All,
I have a dataset with table values in code behind,
which I want to save all the rows to the database(sql server);
i.e coping dataset to table(DB)
Please help me with this, searched but could not get the proper solution.
Ramkumar
("When you build bridges you can keep crossing them. ")
http://ramkumarishere.blogspot.com
|
|
|
|
|
Ramkumar_S wrote: Please help me with this, searched but could not get the proper solution
First search result gives an article[^] from CodeProject. Second result goes to StackOverflow[^].
When searching you'll rarely encounter a solution that exactly fills your needs. You search for examples (not solutions) and adapt those.
Bastard Programmer from Hell
|
|
|
|
|
|
Hi All,
In a batch file which runs few Windows Services in intranet env there is some thing like this
"set ssimpath=%~dp0..\..\Deployment\B2B_WapSvr\C\Program Files\FTG\B2B\WindowsServices\Score". Can anybody let me whats the meaning of it. Means whats the value that is set to ssimpath variable.
Actually what is the meaning of %~dp0, is this realted to Win NT OS or is it related to XP. My local machine has XP in which couple of applications exist.
But may be the B2B_WapSvr is a Win NT server. So please advice me on this regard.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
AFAIK, %~dp0 does not have a meaning in Windows; would be specific to the application that is reading the variable called 'ssimpath'.
Bastard Programmer from Hell
|
|
|
|
|
guys;
In Microsoft Ajax we define an Enum like:
AjaxServerControl1.Priority = function() {}
AjaxServerControl1.Priority.prototype = {
RealTime: 6,
High: 5,
AboveNormal: 4,
Normal: 3,
BelowNormal: 2,
Low: 1
}
AjaxServerControl1.Priority.registerEnum('AjaxServerControl1.Priority');
now how to get the string denoting a value e.i. Priority.High.ToString()
Help people,so poeple can help you.
|
|
|
|
|
If i click A button, user go to homepage.com/B.aspx
But i want to homepage.com insetead of homepage.com/B.aspx.
Is there any way?
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Learn HTML. /troll
You could at least post the code with the link in it or the relevant page request.
|
|
|
|
|
This is a perfectly reasonable newbie question. Posting the code won't help either: it just isn't relevant here.
|
|
|
|
|
You can use iframe, master page, etc. if you don't want to use coding.
Otherwise you can use url routing code in ASP.NET.
You can find it's coding on msdn
Tarun Mangukiya
|
|
|
|