|
I have sign in panel and sign up panel in the same default.aspx page.
i have kept a validation setting with required rule in all textbox in both panels.
now the problem, when user try to sign up and click submit button it will ask him to enter data in the sign in textbox, i guess because all are in one but asp.net won't allow multipe forms in the same page.
what can i do?
|
|
|
|
|
Read this[^].
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
I think, you have to set ValidationGroup for Signin and Signup to check for respective submit.
Parwej Ahamad
|
|
|
|
|
I am getting this error with urlrewriter.net:
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized configuration section rewriter.
Source Error:
Line 70: <errors callbackErrorRedirectUrl=""/>
Line 71: </devExpress>
Line 72: <rewriter>
Line 73: <rewrite url="/tags/(.+)" to="/tagcloud.aspx?tag=$1" />
Line 74: </rewriter>
Source File: C:\Users\Jassim\documents\visual studio 2010\Projects\rmconline\rmconline\web.config Line: 72
here is my web.config:
="1.0"
<configuration>
<configSections>
<sectionGroup name="devExpress">
<section name="settings" type="DevExpress.Web.ASPxClasses.SettingsConfigurationSection, DevExpress.Web.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false"/>
<section name="compression" type="DevExpress.Web.ASPxClasses.CompressionConfigurationSection, DevExpress.Web.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false"/>
<section name="themes" type="DevExpress.Web.ASPxClasses.ThemesConfigurationSection, DevExpress.Web.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false"/>
<section name="errors" type="DevExpress.Web.ASPxClasses.ErrorsConfigurationSection, DevExpress.Web.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" requirePermission="false"/>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</sectionGroup>
</configSections>
<connectionStrings>
<add name="SQLdb" connectionString="Server=999.999.999.999;Port=3306;Database=rmc;Uid=root;Pwd=xxxxxx;" providerName="MySql.Data.MySqlClient"/>
</connectionStrings>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="DevExpress.Web.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="DevExpress.Data.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>
<add assembly="DevExpress.Web.ASPxScheduler.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>
<add assembly="DevExpress.XtraScheduler.v11.1.Core, Version=11.1.4.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/>
<add assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"/></assemblies>
</compilation>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
</authentication>
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
</providers>
</roleManager>
<httpModules runAllManagedModulesForAllRequests="true">
<add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule"/>
<add type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" name="UrlRewriter" />
</httpModules>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add type="DevExpress.Web.ASPxClasses.ASPxHttpHandlerModule, DevExpress.Web.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" name="ASPxHttpHandlerModule"/>
</modules>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
<devExpress>
<settings rightToLeft="false"/>
<compression enableHtmlCompression="false" enableCallbackCompression="true" enableResourceCompression="true" enableResourceMerging="false"/>
<themes enableThemesAssembly="true"/>
<errors callbackErrorRedirectUrl=""/>
</devExpress>
<rewriter>
<rewrite url="/tags/(.+)" to="/tagcloud.aspx?tag=$1" />
</rewriter>
</configuration>
|
|
|
|
|
Although i have never used URL rewriting but it seems like your Config file have incorrect elements.
your last section
<rewriter>
<rewrite url="/tags/(.+)" to="/tagcloud.aspx?tag=$1" />
</rewriter>
should be like,
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>pattern to look for</LookFor>
<SendTo>string to replace pattern with</SendTo>
</RewriterRule>
<RewriterRule>
<LookFor>pattern to look for</LookFor>
<SendTo>string to replace pattern with</SendTo>
</RewriterRule>
...
</Rules>
</RewriterConfig>
Please Refer MSDN Article[^]
Hope above like will resolve your issue.
Thanks
-Amit Gajjar
Thanks
-Amit Gajjar (MinterProject)
|
|
|
|
|
Hi,
Try checking here[^].
|
|
|
|
|
Hi There.
I am having a problem in populating html table from database dynamically. What i mean is that i
have a table in database that have let say 10 enteries, I want to display those 10 entries in a
html table using loop. I am new to ASP.NET, I've previously woked in php. I can present the
scenario in php and please help me do the same thing in ASP.NET. In php what i normally do is
search the database, grab the table in fetch array and in html table i create one row and use
while loop so that all of the 10 entries are populated at runtime. Here is a demonstration
code in head:
<pre lang="PHP">= mysql_query(
in body code:
<table>
<tr>
<td>Username</td>
<td>Email</td>
<td>Position</td>
<td>Status</td>
</td>
//start of the loop
<?php while($fetch = mysql_fetch_array($query) { ?>
<tr>
<td><?php echo $fetch["username"]; ?> </td>
<td><?php echo $fetch["email"]; ?> </td>
<td><?php echo $fetch["position"]; ?> </td>
<td><?php echo $fetch["status"]; ?> </td>
</tr><?php } ?>//End of loop
</table>
When i use foreach loop in asp.net to do the same thing the it displays only the last row in the
database table...I am using three tier architecture...
projectsLoad_BLL bo = new projectsLoad_BLL();
DataSet ds = new DataSet();
DataTable dt = ds.Tables[0];
int num = 1;
foreach (DataRow dr in dt.Rows)
{
lblno.Text = num.ToString();
lblusername.Text = dr["username"].ToString();
lblemail.Text = dr["email"].ToString();
lblposition.Text = dr["position"].ToString();
lblstatus.Text = dr["status"].ToString();
dt.NewRow();
num++;
}
In HTML Table:
<table>
<thead>
<tr>
<th>No.</th>
<th>Username</th>
<th>Email</th>
<th>Position</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td><asp:Label ID="lblno" runat="server"
Text="Label"></asp:Label> </td>
<td><asp:Label ID="lblusername" runat="server"
Text="Label"></asp:Label></td>
<td><asp:Label ID="lblemail" runat="server"
Text="Label"></asp:Label></td>
<td><asp:Label ID="lblposition" runat="server"
Text="Label"></asp:Label></td>
<td><asp:Label ID="lblstatus" runat="server"
Text="Label"></asp:Label></td>
</tr>
</tbody>
</table>
I know that this method is wrong...if anyone can point to the right direction...thanks in
advance
|
|
|
|
|
You can use ASP.NET Repeater control for the purpose. It will be sufficient for your need. For more details on Repeater Control check out here[^]. It also has a sample code at the end. Try it and post if you face any problem. I will be happy to help you.
Always Keep Smiling.
Yours Pankaj Nikam
|
|
|
|
|
Thank You very much for your help. I've managed to use asp repeater with datatables efficiently. What i did is added a repeater in asp markup and bind it to dataset. And in i've placed <%# Eval("columnName") %> and viola. All operations are working fine. Thanks again!
|
|
|
|
|
Using Repeater is certainly a very good choice. I am happy that it worked for you I have one more suggestion - if you are having only read-only records i.e. you only view them, then consider using SqlDataReader object instead of the DataSet as it is fast - read-only - forward only.
Happy to help you
Always Keep Smiling.
Yours Pankaj Nikam
|
|
|
|
|
You should create a container, it can be a table called table_Container, and then loop threw the dataset, and create your tableRow and cells in code.
You can use the repeater control, but I think you should learn the basics first. Do not use Response.write(""), because response write is reserved for higher level responses like a page error code, or a data set or something.
PHP doesn't have html objects, so echo("tr" is quite common, but is poor practice in general.
foreach (DataRow dr in dt.Rows) {
TableRow tr = new TableRow;
table_Container.controls.add(tr);
TableCell td = new TableCell;
tr.controls.add(td);
Label lbl_UserName = new Label;
lbl_UserName.text = dr["username"];
td.controls.add(lbl_UserName);
}
|
|
|
|
|
I totally agree with him that you should learn basic thing how to create response.write(".
|
|
|
|
|
Hi! I don't know how to use the site mappath control in ASP.net 3.5 under visual studio 2008 .So please any buddy can help me?
safi belim
|
|
|
|
|
Start here[^].
You could always have tried Google for yourself.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
thanks but I can't what u say?
Please provide some tutorial and sample for site map path control.
Thank You
|
|
|
|
|
Did you not click on the link. It is what you asked for. If that doesn't help then try using Google to search for what you want or, better, go read the documentation until you understand how to do it.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
What is ref and out and how to use in asp.net ?
Please explain with an example .
|
|
|
|
|
See the documentation[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
|
ref is used in vb.net and out is used in c#
like this
private sub add(byref a as int,byref b as int)
a=45
b=56
End Sub
example it is on
button click sub
add(a,s)
End Sub
|
|
|
|
|
hi
i have an error,
i have written a code to send an email.
the email was sent to private email address
like info@yourdomain.com
but the email was not sent to any
"gmail or yahoo mail address."
when i tried to sent an email to gmail or yahoo account the following error occurs,
"Bad sequence of commands. The server response was: This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server."
here is my code :
protected void SendEmail()
{
SmtpClient smtpClient = new SmtpClient("mail.mydomain.com", 25);
MailMessage Msg = new MailMessage();
//------for Email Data----------------------------------
Msg.To.Add(TxtEmail .Text .Trim ());
Msg.From = new MailAddress("tehnical@mydomain.com");
Msg.IsBodyHtml = true;
//----Get Max userid------------------------------
string strConnection = ConfigurationManager.ConnectionStrings["AIGamesConnectionString"].ConnectionString;
SqlConnection MaxUserIdCon = new SqlConnection(strConnection);
MaxUserIdCon.Open();
string StrMaxUserId = "select max(id) as Id from users";
SqlCommand MaxUserIdComm = new SqlCommand(StrMaxUserId, MaxUserIdCon);
SqlDataAdapter MaxUserIdDa = new SqlDataAdapter(MaxUserIdComm);
DataSet MaxUserIdDs = new DataSet();
MaxUserIdDa.Fill(MaxUserIdDs);
MaxUserIdCon.Close();
int MaxUserId=1;
if (MaxUserIdDs.Tables [0].Rows.Count >0)
{
MaxUserId = Convert.ToInt32(MaxUserIdDs.Tables [0].Rows [0]["Id"].ToString ());
}
//------------------------------------------------
StringBuilder bodyMsg = new StringBuilder();
bodyMsg.Append("Thank you for creating your account.\n\nPlease follow this link to activate: ");
bodyMsg.Append("
Activate Your Account");
Msg.Body = bodyMsg.ToString();
//authentication--------------------------------------------------------------------------------
SmtpClient mySmtpClient = new SmtpClient();
System.Net.NetworkCredential myCredential = new System.Net.NetworkCredential("tehnical@mydomain.com", "password");
mySmtpClient.Host = "mail.mydomain.com";
mySmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
mySmtpClient.UseDefaultCredentials = false;
mySmtpClient.Credentials = myCredential;
//-------------------------------------------------------------------------------------------
mySmtpClient.Send(Msg);
LblMessage.Text = "An email for account verification has been sent,please check your email";
EmptyTextBoxes();
// ------for Email Data----------------------------------
}
|
|
|
|
|
|
You created 2 SmtpClient Objects, you must of mixed up the object that sends
You really should structure your code better, because that was a hard read. I don't see why you would build your message body via sql in the middle of your email function,
Why not build your html message first, and then pass the message to the smtp function, in which you set your parameters, and send the message.
You didn't attach the message (msg) to the smtp object, sloppy code will produce errors, that you can't see.
|
|
|
|
|
Try this:
MailMessage Msg = new MailMessage();
Msg.To.Add( new MailAddress(TxtEmail .Text .Trim ()));
Msg.From = "tehnical@mydomain.com";
Msg.IsBodyHtml = true;
Msg.Subject = "Login Details";
SmtpClient smtp = new SmtpClient();
smtp.Host = "mail.mydomain.com";
smtp.Port = 1234;
smtp.EnableSsl = GmailSSL;
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.UseDefaultCredentials = false;
smtp.Credentials = new NetworkCredential("tehnical@mydomain.com","password");
smtp.Send(Msg);
|
|
|
|
|
In a C# 2010 web form application that uses web form controls, I have a scrollbar used on a panel control. The user would like to be able to retain the scrollbar position while they are on the current web form page. They would like the scrollbar to retain its position until they have pointed to the next web form page. Since I do not know how to accomplish this goal, I am wondering how to accomplish this task.
The asp.net markup looks like the following:
<asp:Panel ID="Panel1" runat="server" ScrollBars="Auto" Height="130px" Width="455" CssClass="TextBoxStyle"> <asp:CheckBoxList ID="ChkBoxLst" runat="server" AutoPostBack="true"> </asp:CheckBoxList> </asp:Panel>
|
|
|
|
|