Click here to Skip to main content
       

ASP.NET

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
QuestionMVC vs n-Tier ArchitecturememberBikash Prakash Dash21 May '13 - 0:08 
Comparison of MVC & n-Tier Architecture
Give comparison regarding their
->Advantages
->Disadvantages
->Purpose of use
etc etc
AnswerRe: MVC vs n-Tier ArchitecturemvpRichard MacCutchan21 May '13 - 2:58 
http://www.codeproject.com/Messages/1278599/How-to-get-an-answer-to-your-question.aspx[^].
Use the best guess

AnswerRe: MVC vs n-Tier ArchitectureprofessionalManfred R. Bihy21 May '13 - 3:17 
Start here: Multitier architecture[^] and pay special attention to the subsection Comparison with the MVC architecture[^].
 
Regards,
— Manfred

"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian


Questioninstallation of visual vsn servermemberMember 870181320 May '13 - 21:25 
hi experts,
i am trying to install vsn server 2.5.9 from the link http://www.visualsvn.com/visualsvn/download/[^]
while installing vsn server i was asked to choose port no(2 port nos are displayed 443 & 8443).i have chosen 443 port no for https.so what i did is i removed https & selected 443 for visual vsn.now vsn is working fine.the issue i am facing is i am unable to run my application on iis using http.when i run my application i am getting "the address is incorrect,type the correct address".but the address is correct in the address bar.how to overcome this problem?if i want to run my application using https what port n do i have to choose?could anyone help me pls...
QuestionValidation Question - HelpmemberWickedFooker20 May '13 - 14:25 
Okay so very easy to validate an email in ASP and also very easy to validate that someone enters between 6 and 30 characters but can someone help me in making sure that BOTH are checked in a Custom Validation perhaps. What I have for example:
 
<asp:CustomValidator ID="CustomValidator1"  ClientValidationFunction="/^([_a-zA-Z0-9-]+)(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,3})$/" runat="server" 
                            ControlToValidate="txtUserName" ErrorMessage="CustomValidator" 
                            SetFocusOnError="True"></asp:CustomValidator>
 
I am sure it is something simple but just need to know. Right now all it is doing is just checking that the email is valid, but if nothing is on the field it checks nothing.
AnswerRe: Validation Question - HelpprofessionalManfred R. Bihy21 May '13 - 3:26 
As found here: http://bytes.com/topic/asp-net/answers/623177-customvalidator-do-not-work-empty-fields[^] you should try the hint to set ValidateEmptyText[^] to true.
 
Regards,
— Manfred

"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian


QuestionMerging Two columns under same heading in Gridviewmemberpavithrasubbareddy20 May '13 - 2:40 
Hi Buddies,
 
I wanna to combine two columns with same heading using asp.net with c#.values i'm getting from database.
 
For example:
 
database retruning rows as
 
empid empname empdept empbranch
1 Suresh dev Bangalore
2 kavitha tester bangalore
3 Siva dev chennai
 

Required Result in UI is:
 
emp_personal emp_official
 
empid empname empdept branch
 
1 suresh dev bangalore
2 kavitha tester bangalore
3 siva dev chennai
AnswerRe: Merging Two columns under same heading in GridviewmemberDavid Mujica20 May '13 - 3:46 
Try concatenating the two columns in your select statement.
 
Example:
select empid empname + ' ' + empdept + ' ' + empbranch
GeneralRe: Merging Two columns under same heading in Gridviewmemberpavithrasubbareddy20 May '13 - 19:14 
Hi David,
 
i don't want to merge values,need to show them in separate table under same heading
AnswerRe: Merging Two columns under same heading in Gridviewmembercyber_addicted21 May '13 - 0:25 
SELECT ISNULL(empid, '') + ' ' + ISNULL(empname, '') AS emp_personal, ISNULL(empdept, '') + ' ' + ISNULL(empbranch, '') AS emp_official
FROM emp
 
check this query and please confirm me is this working for you or not?
QuestionAjax Cascading DropdownmemberLAIJU KHAN20 May '13 - 1:36 
I am using a CascadingDropdown for three dropdownlists for country,state and district.when the country is selected state will automatically get values,i have a tab index issue if the state value doesnt come on tabpress the control will on the fourth control that is after district dropdown.I had made tab index correctly any way to make it work nicely.If stae comes up with value then no problem.if it doesn't then irritating
lk

QuestionClearing Textboxes (Foreach) Not WorkingmemberMember 991209119 May '13 - 7:24 
Hi all. I am writing a program using Microsoft Visual Web Developer. I have 3 textboxes (TextBox1, TextBox2 and TextBox3) and a button. I want to use a foreach loop to clear textboxes.
 
For some reason this code doesnt work on a Webform. While debugging it, the debugger skips the line: "if (c is TextBox)" and so the textboxes dont get cleared. Here control = {ASP.default_aspx}
 
When I use the below code in Microsoft Visual C# with a windows form it works. What could be wrong?
 
Here is the code:
 
protected void Button1_Click(object sender, EventArgs e)
{
ClearTextBoxes(this);
}
 

public void ClearTextBoxes(Control control)
{
foreach (Control c in control.Controls)
{
if (c is TextBox)
{
((TextBox)c).Text = " ";
}
 

}
AnswerRe: Clearing Textboxes (Foreach) Not WorkingprofessionalRichard Deeming20 May '13 - 2:06 
Are your TextBoxes immediate descendants of the page? It's unlikely; you've probably got several layers of controls between them.
 
Try this:
public void ClearTextBoxes(Control control)
{
   foreach (Control c in control.Controls)
   {
      var textBox = c as TextBox;
      if (textBox != null)
      {
         textBox.Text = " ";
      }
      else if (c.HasControls)
      {
         ClearTextBoxes(c);
      }
   }
}



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Clearing Textboxes (Foreach) Not WorkingmemberMember 991209121 May '13 - 7:56 
Thanks!
AnswerRe: Clearing Textboxes (Foreach) Not Workingmembercyber_addicted21 May '13 - 0:33 
try this code
 
protected void Button1_Click(object sender, EventArgs e)
{
ClearTextBoxes(Page.Controls);
}
void ClearTextBoxes(ControlCollection control)
{
foreach (Control ctrl in control)
{
if (ctrl is TextBox)
((TextBox)ctrl).Text = string.Empty;
ClearInputs(ctrl.Controls);
}
}
GeneralRe: Clearing Textboxes (Foreach) Not WorkingmemberMember 991209121 May '13 - 7:57 
Thanks man
GeneralRe: Clearing Textboxes (Foreach) Not Workingmembercyber_addicted21 May '13 - 20:14 
your welcome
QuestionC#.Net Windows ApplicationmemberMohsin Afzal18 May '13 - 2:20 
I Want To Validate my Windows Project while User can not Share this project to another or in One year Project will be Expired
Like An Antivirus Program Expired after One or two months
D'Oh! | :doh:
AnswerRe: C#.Net Windows ApplicationprofessionalMohammed Hameed18 May '13 - 10:57 
I would suggest you to google like this: "implementing licensing for trial versions in windows applications"
Be a good professional who shares programming secrets with others.

AnswerRe: C#.Net Windows Applicationmemberryanb3121 May '13 - 10:24 
First off, this is the ASP.Net forum and not the Windows Application forum. Secondly, you need to implement a license. There are many, many ways to do it. Some are easier but not as resistant to hacking and others are more complex to implement. You may want to research online the various options and then decide what works best for you.
There are only 10 types of people in the world, those who understand binary and those who don't.

Questionmvc bookmemberMember 870181318 May '13 - 1:13 
hi,
can anyone suggest me the best book for mvc4 pls
AnswerRe: mvc bookmembercyber_addicted21 May '13 - 0:38 
http://it-ebooks.info/book/1617/
try this link to download the book on mvc4
GeneralRe: mvc bookmemberMember 870181321 May '13 - 3:40 
hi,
thanks for replying
GeneralRe: mvc bookmembercyber_addicted21 May '13 - 20:15 
ur welcome dear...
QuestionAccess Database, ASP/C# Drop Down List populating a Drop Down ListmemberWickedFooker17 May '13 - 15:00 
Ok this has sort of been asked before but also somewhat differently here. I have a regular drop down (not connected to a database) that just has the topics of subjects.
 
This is a sample of what I have:
 
<asp:DropDownList id="ddlcourseType" runat="server" 
                            onselectedindexchanged="ddlcourseType_SelectedIndexChanged" 
                            AutoPostBack="True">
                       <asp:ListItem Value="None">Please Select</asp:ListItem>
                       <asp:ListItem Value="Engl">English</asp:ListItem>
                       <asp:ListItem Value="Math">Math</asp:ListItem>
                       <asp:ListItem Value="Soci">Social Studies</asp:ListItem>
                       <asp:ListItem Value="Scie">Science</asp:ListItem>
                       <asp:ListItem Value="Hist">History</asp:ListItem>
                       </asp:DropDownList>
 
I want to make it so that when it changes the next part will search and select teachers that teach that specific subject. I am using an Access Database for connection.
 
I have pieced together some of what others did in an attempt to get it to work but no.
 
 protected void ddlcourseType_SelectedIndexChanged(object sender, EventArgs e)
    {
        OleDbConnection dbConn = null;
        OleDbCommand dbCmd;
        OleDbDataReader dr;
        String strConnection;
        String strSQL;
        string path = Server.MapPath("eAcademy_DB.mdb");
 
        string Teachable = Convert.ToString(ddlcourseType.SelectedValue);
        strConnection = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + path;
        dbConn = new OleDbConnection(strConnection);
        dbConn.Open();
        strSQL = "select * from tblEmployee where canTeach=" + Teachable;
 
        dbCmd = new OleDbCommand(strSQL, dbConn);
        DataSet ds = new DataSet();
                
        dbConn.Close();
        ddlTeacher.DataSource = ds;
        ddlTeacher.DataTextField = "emp_ID";
        ddlTeacher.DataValueField = "emp_ID";
        ddlTeacher.DataBind();
        ddlTeacher.Items.Insert(0, new ListItem("--Select--", "0"));
        if (ddlTeacher.SelectedValue == "0")
        {
            ddlTeacher.Items.Clear();
            ddlTeacher.Items.Insert(0, new ListItem("--Select--", "0"));
        }
    }
 
I think what I really need to do is make a for loop and have it iterate for the amount of teachers that are in the list, and then have it populate the list, but not sure how exactly to do this.
 
It is hanging up on the ds part each time. I know the databind is causing it so this is why I thought perhaps better to iterate this? Any help would be appreciated.
 
The values from the first list are in the tblEmployee for "T" Teachers that can teach those classes. So that is why I want to 2nd drop down populated with their names. Thanks!

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 25 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid