Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all 3509 articles
Browse latest View live

Task 4 - Updating the HTML Code from the Browser

$
0
0

I follow the guide and failed in Task4, anyone succeeded in task 4? http://www.asp.net/visual-studio/overview/2013/visual-studio-2013-web-tools

For Task 4, I didn't invoke the Design Model feature in Google Chrome when press CTRL + ALT + D. anyone successfully to invoke it?

Task 4 - Updating the HTML Code from the Browser
In this task, you will use the Browser Link's Design Mode feature to edit the DOM object from the browser and transfer the changes to the HTML source file in Visual Studio.
1. In Google Chrome, press CTRL + ALT + D to enable Design Mode.
2. Move the pointer over the Lorem Ipsum dolor sit amet label and click.

From <http://www.asp.net/visual-studio/overview/2013/visual-studio-2013-web-tools


CreateUserWizard creates correct new user plus a user named "User Name"

$
0
0

I don't have a clue as to what is happening here.  I'm using the CreateUserWizard to create new users and mostly it works but for every new user it adds it tries to add a user named "User Name" (in addition to the user I'm adding) and therefore always gives a status of the username already exists.  I'm hoping someone can look at the code and see where the problem is.  I'm using Visual Web Developer 2010 Express, VB.  Hopefully its something small that I'm not seeing :).  Thanks!

The VB portion:

Partial Class NewUsers
    Inherits System.Web.UI.Page
    Dim newUser As MembershipUser

    Protected Sub CreateUserWizard1_CancelButtonClick(sender As Object, e As System.EventArgs) Handles CreateUserWizard1.CancelButtonClick
        Response.Redirect("Main.aspx")
    End Sub


    Protected Sub CreateUserWizard1_CreatedUser(sender As Object, e As System.EventArgs) Handles CreateUserWizard1.CreatedUser

        Dim createStatus As MembershipCreateStatus
        newUser = Membership.CreateUser(CreateUserWizard1.UserNameLabelText, CreateUserWizard1.PasswordLabelText, CreateUserWizard1.EmailLabelText, "What is your favorite color?", CreateUserWizard1.QuestionLabelText, True, createStatus)

        Select Case createStatus
            Case MembershipCreateStatus.Success
                CreateUserWizard1.CompleteSuccessText = "The user account was successfully created!"
            Case MembershipCreateStatus.DuplicateUserName
                CreateUserWizard1.CompleteSuccessText = "That username already exists."
            Case MembershipCreateStatus.DuplicateEmail
                CreateUserWizard1.CompleteSuccessText = "A user with that Email address already exists."
            Case MembershipCreateStatus.InvalidEmail
                CreateUserWizard1.CompleteSuccessText = "PLease enter a VALID email address."
            Case MembershipCreateStatus.InvalidAnswer
                CreateUserWizard1.CompleteSuccessText = "The security answer is not valid"
            Case MembershipCreateStatus.InvalidPassword
                CreateUserWizard1.CompleteSuccessText = "The password entered is invalid. PLease enter a password with at least 7 cahacters and one non-alphanumeric."
            Case Else
                CreateUserWizard1.CompleteSuccessText = "Unknown Error: Account NOT created."
        End Select

    End Sub

    Protected Sub CreateUserWizard1_ContinueButtonClick(sender As Object, e As System.EventArgs) Handles CreateUserWizard1.ContinueButtonClick
        Response.Redirect("Main.aspx")
    End Sub

End Class

And the ASP portion:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="NewUsers.aspx.vb" Inherits="NewUsers" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title></title></head><body><form id="form1" runat="server" autocomplete="off"
    style="font-family: 'Arial Black'; font-size: medium"><div></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NEW USER 
    SET-UP:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    Select Role<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"><asp:ListItem></asp:ListItem><asp:ListItem>Admin</asp:ListItem><asp:ListItem>Read Only</asp:ListItem><asp:ListItem>Update with Delete</asp:ListItem><asp:ListItem>Update without Delete</asp:ListItem><asp:ListItem>View Only</asp:ListItem></asp:DropDownList><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Arial Black" 
        Font-Size="Large" ForeColor="Red" 
        Text="You MUST select a Role for this user!"></asp:Label><asp:CreateUserWizard ID="CreateUserWizard1" runat="server" BackColor="#F7F6F3" 
        BorderColor="#E6E2D8" BorderStyle="Solid" BorderWidth="1px" 
        DisplayCancelButton="True" Font-Names="Verdana" Font-Size="0.8em" 
        LoginCreatedUser="False" style="margin-left: 215px" Width="427px"><ContinueButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" 
            BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" 
            ForeColor="#284775" /><CreateUserButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" 
            BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" 
            ForeColor="#284775" /><TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /><WizardSteps><asp:CreateUserWizardStep runat="server" /><asp:CompleteWizardStep runat="server" /></WizardSteps><HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" 
            Font-Size="0.9em" ForeColor="White" HorizontalAlign="Center" /><NavigationButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" 
            BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" 
            ForeColor="#284775" /><SideBarButtonStyle BorderWidth="0px" Font-Names="Verdana" ForeColor="White" /><SideBarStyle BackColor="#5D7B9D" BorderWidth="0px" Font-Size="0.9em" 
            VerticalAlign="Top" /><StepStyle BorderWidth="0px" /></asp:CreateUserWizard></form></body></html>

Lost ability to view database tables from within Visual Studio

$
0
0

I removed Visual Studio Express and VS Ultimate RC both 2013. Now when I try to view a database table "Show Table Data" from within VS 2012 Professional, I get the following error....

    The specified module could not be found. (Exception from HRESULT: 0X8007007E)

Many searches only reveal 64 deployment issues, nothing related to SQL usage from within VS.

I understand that a DLL must have been uninstalled, but how can I tell which one and where it must go?

Visual Studio Community 2013 vs Visual Studio Professional 2013 Update 4

$
0
0

Hey guys, new here.

I've had a small look but whats the difference between them?

How to create a new folder within the direcrtory of a solution via code

$
0
0

Hello,

I can't seem to find a simple solution which will allow me to create a folder within the directory of a solution when the application is running, does any one have any example code to do so?

VS 2013 Error : Unable to connec to the configured web server . After Installing XAMPP Apache

$
0
0

Hi,
I was working with a ASP.NET project and for a while I started Apache from XAMPP for that i had to Stop "World Wide Web Publishing" from Services. and I did disabled IIS and .NET Framwork from "Windows Features".

I checked them back to on and set "WWW publishing" in Services to start.  but still i can't run the ASP project.
It getting
Unable to connec to the configured web server , 
Failed to register url "http://localhost:58114/" for site ""site name" application "/". Error description . The format of the specified network name is invalid (0x800704be)
error.
Hope Someone can help me out ,
Thanks in Advance :).

Edited : Found the Solution 

From cmd run : netsh http show iplisten
Check the listed IP address it should show something like 192.168.0.90

then delete it by running : netsh http delete iplisten ipaddress=192.168.0.90
add : netsh http add iplisten ipaddress=0.0.0.0

reset IIS by running : iisreset

Visual Studio 2012 not opening .MDF Database Because It Is Version 661.

$
0
0

I have Microsoft SQL Server 2008 installed on my computer along with Microsoft SQL Server 2008 R2.

I had a website project that I was working on in Visual Studio Express 2010. I then had Visual Studio 2012 installed and made use of the ASP.NET Website Administration Tool to create and administer user accounts. Visual Studio created inside the App_Data folder of my website project the ASPNETDB.mdf database to store login information ect. and update my web.config file. Everything was working fine I could connect to the database and login to the back end of my website just fine after providing my login credentials.   

I recently had to uninstall and reinstall these applications. Now when I try to access the ASPNETDB.mdf  in the Solution Explorer I see a red X beside the database name and when I click on it to try to access it the following error appears.

The database 'C:\USERS\AHOF\DESKTOP\WEB\WEBSITE10 -5-7-12\APP_DATA\ASPNETDB.MDF' cannot be opened because it is version 661. This server supports version 655 and earlier. A downgrade path is not supported. Could not open new database 'C:\USERS\AHOF\DESKTOP\WEB\WEBSITE10 -5-7-12\APP_DATA\ASPNETDB.MDF'. CREATE DATABASE is aborted. An attempt to attach an auto-named database for file C:\Users\ahof\Desktop\web\WebSite10 -5-7-12\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

I can bring up the website fine but when I try to lo-gin to the back end of the website I get the same error.

What is causing the error and how do I fix it?

Cannot pre-compile during publish

$
0
0

I have just installed Visual Studio 2012 (Premium). Version 11.0.50721

I have created a site, and I would like to publish it. I right click on the project, and select publish. I create a new profile, enter the FTP details. Validate - all good.

Now, the problem. I click on the Settings tab. I have only 1 check box. And the only option I have is to Delete all existing files prior to publish.

Why can't I pre-compile? Why can't I exclude options from the app_data folder (or similar folder)? The following is a screen shot from my machine:

enter image description here

More back story. It's been working fine for many months, if not into the years. VS said it was missing some Razor code or similar so I performed the update. After this update, VS would not open! It would crash. So, I manually removed all these updates from the Control Panel. This fixed the crash but left the issue mentioned above. So, I performed a repair. Issues persists. I then uninstalled VS 2012 and re-installed it. The same issue persists.


Test Explorer window no longer showing "Output" for unit test runs

$
0
0

I am using the built-in unit testing framework in visual studio 2013.

In my unit tests, I write various results from my tests with System.Diagnostics.Debug.WriteLine(sbPayLoad.ToString());

When a test is finished, in the Test Explorer windows lower pane, I would get the Test status (Passed or Failed) then the Elapsed time on the next line; then I usually get a link underneath reading "Output" which will show me everything I wrote with System.Diagnostics.Debug.WriteLine(). All of a sudden today, that "Output" link disappeared and I do not know how to get it back. I open the Output window and do not see the results either. What happened? I think somehow my settings were changed and now I have this problem. Please someone help so I can read my test results.

error after update 4 SetSite failed for package [AutoLoadPackagePackage]

$
0
0

Get this error every time I start up after installing update 4

SetSite failed for package [AutoLoadPackagePackage]


any help, thanks

Export selected sql tables to Excel as separate pages

$
0
0

I'm using Visual Web Designer 2010, VB.  I would like to know if there is a way to export selected Sql tables (approximately 13) to Excel, placing them all in the same spreadsheet but placing each table on a separate Excel (2003) worksheet?  Can this be done with one single command (I hope) or would it be necessary for a separate command for each table?  I'm a newbie and this is above my level at this point.  Thanks!

Trouble changing default StreamWriter filename

$
0
0

I've written the program below and it works fine, but now I would like to change the default built-in filename and nothing I do seems to work.  The line I would like to change, or think needs to change is:

Dim ExcelFileName As String = Path,Combine(Request,PhysicalApplicationPath, "a.xls")

I've tried everything I can think of including Dim ExcelFileName As String = "C:\Excel_Database.xls" but every attempt results in no output being generated.  The program appears to run fine, just doesn't output anything; no error messages.  The PhysicalApplicationPath is not where I would like production work to go!  Ideally, I would like for the individual user to select his/her own path and filename.  Any suggestions? Thanks!

        Try
            Dim rows As Integer = ds1.Tables(0).Rows.Count + 1
            Dim cols As Integer = ds1.Tables(0).Columns.Count
            Dim ExcelFileName As String = Path.Combine(Request.PhysicalApplicationPath, "a.xls")
            If File.Exists(ExcelFileName) Then
                File.Delete(ExcelFileName)
            End If
            Dim writer As New StreamWriter(ExcelFileName, False)
            writer.WriteLine("<?xml version=""1.0""?>")
            writer.WriteLine("<?mso-application progid=""Excel.Sheet""?>")
            writer.WriteLine("<Workbook xmlns=""urn:schemas-microsoft-com:office:spreadsheet""")
            writer.WriteLine(" xmlns:o=""urn:schemas-microsoft-com:office:office""")
            writer.WriteLine(" xmlns:x=""urn:schemas-microsoft-com:office:excel""")
            writer.WriteLine(" xmlns:ss=""urn:schemas-microsoft-com:office:spreadsheet""")
            writer.WriteLine(" xmlns:html=""http://www.w3.org/TR/REC-html40/"">")
            writer.WriteLine(" <DocumentProperties xmlns=""urn:schemas-microsoft-com:office:office"">;")
            writer.WriteLine("  <Author>Automated Report Generator Example</Author>")
            writer.WriteLine(String.Format("  <Created>{0}T{1}Z</Created>", DateTime.Now.ToString("yyyy-mm-dd"), DateTime.Now.ToString("HH:MM:SS")))
            writer.WriteLine("  <Company>51aspx.com</Company>")
            writer.WriteLine("  <Version>11.6408</Version>")
            writer.WriteLine(" </DocumentProperties>")
            writer.WriteLine(" <ExcelWorkbook xmlns=""urn:schemas-microsoft-com:office:excel"">")
            writer.WriteLine("  <WindowHeight>8955</WindowHeight>")
            writer.WriteLine("  <WindowWidth>11355</WindowWidth>")
            writer.WriteLine("  <WindowTopX>480</WindowTopX>")
            writer.WriteLine("  <WindowTopY>15</WindowTopY>")
            writer.WriteLine("  <ProtectStructure>False</ProtectStructure>")
            writer.WriteLine("  <ProtectWindows>False</ProtectWindows>")
            writer.WriteLine(" </ExcelWorkbook>")
            writer.WriteLine(" <Styles>")
            writer.WriteLine("  <Style ss:ID=""Default"" ss:Name=""Normal"">")
            writer.WriteLine("   <Alignment ss:Vertical=""Bottom""/>")
            writer.WriteLine("   <Borders/>")
            writer.WriteLine("   <Font/>")
            writer.WriteLine("   <Interior/>")
            writer.WriteLine("   <Protection/>")
            writer.WriteLine("  </Style>")
            writer.WriteLine("  <Style ss:ID=""s21"">")
            writer.WriteLine("   <Alignment ss:Vertical=""Bottom"" ss:WrapText=""0""/>")
            writer.WriteLine("  </Style>")
            writer.WriteLine(" </Styles>")
            'Capacitors (1)
            writer.WriteLine(" <Worksheet ss:Name=""Capacitors"">")
            writer.WriteLine(String.Format("  <Table ss:ExpandedColumnCount=""{0}"" ss:ExpandedRowCount=""{1}"" x:FullColumns=""1""", cols.ToString(), rows.ToString()))
            writer.WriteLine("   x:FullRows=""1"">")
            'generate title
            writer.WriteLine("<Row>")
            For Each eachCloumn As DataColumn In ds1.Tables(0).Columns
                writer.Write("<Cell ss:StyleID=""s21""><Data ss:Type=""String"">")
                writer.Write(eachCloumn.ColumnName.ToString())
                writer.WriteLine("</Data></Cell>")
            Next
            writer.WriteLine("</Row>")
            'generate data
            For Each eachRow As DataRow In ds1.Tables(0).Rows
                writer.WriteLine("<Row>")
                Dim currentRow As Integer = 0
                While currentRow <> cols
                    writer.Write("<Cell ss:StyleID=""s21""><Data ss:Type=""String"">")
                    writer.Write(eachRow(currentRow).ToString())
                    writer.WriteLine("</Data></Cell>")
                    currentRow += 1
                End While
                writer.WriteLine("</Row>")
            Next
            writer.WriteLine("  </Table>")
            writer.WriteLine("  <WorksheetOptions xmlns=""urn:schemas-microsoft-com:office:excel"">")
            writer.WriteLine("   <Selected/>")
            writer.WriteLine("   <Panes>")
            writer.WriteLine("    <Pane>")
            writer.WriteLine("     <Number>3</Number>")
            writer.WriteLine("     <ActiveRow>1</ActiveRow>")
            writer.WriteLine("    </Pane>")
            writer.WriteLine("   </Panes>")
            writer.WriteLine("   <ProtectObjects>False</ProtectObjects>")
            writer.WriteLine("   <ProtectScenarios>False</ProtectScenarios>")
            writer.WriteLine("  </WorksheetOptions>")
            writer.WriteLine(" </Worksheet>")
            'Finish
            writer.WriteLine("</Workbook>")
            writer.Close()
            Response.Write("<script language=""javascript"">" & "alert('" & "convert completed!')" & "</script>")
        Catch ex As Exception
            Response.Write(("<script language=""javascript"">" & "alert('" & "error! ") + ex.Message & "')" & "</script>")
        End Try

VS2013 Ultimate - an exception popup window occured when launching

$
0
0

I installed VS 2013 Ultimate on my machine, then ran some updates . Now when I launching the VS 2013, always got an exception popup window.  check the AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml

I saw this error

<entry>
    <record>733</record>
    <time>2014/12/09 23:12:43.765</time>
    <type>Error</type>
    <source>Extension Manager</source>
    <description>Extension will not be loaded because an extension with the same ID &apos;Microsoft.Windows.DevelopmentKit.Desktop&apos; is already loaded at C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.0\DESKTOP SDK\...</description>
    <path>C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.1\DESKTOP SDK\</path>
  </entry>

I have both VS 2012 and 2013 installed on my desktop.

C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.0\DESKTOP SDK\...
C:\PROGRAM FILES (X86)\COMMON FILES\MICROSOFT\EXTENSIONMANAGER\EXTENSIONS\MICROSOFT\WINDOWS KITS\8.1\DESKTOP SDK\

Can someone give me some idea how to resolve this issue?

Thanks,

-Ying Ren

Error JavaScript runtime error: Object doesn't support property or method 'bind'

$
0
0

After updating to visual studio 2013 update 3, I am getting the following runtime error on every page with a formview.  

Unhandled exception at line 65, column 3427 in http://localhost:53693/9b3609c5e71a4703b362072b60faa99e/browserLink 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'bind'. 

The debugger points to this line:  

try { this.addExtension("Microsoft.VisualStudio.Web.BrowserLink.HtmlMappingExtensionFactory", (function(n,t){function k(){var b=this,w=function(n,i){var e,r,u,o;if(!i)return null;if(e=f(i),e)return e.selectorData==n?e:null;if(t(i).is(n.selector)){if(r=null,n.parent){for(u=i.parentElement,o=n.selector.split(">").length-1;o>0;o--)u=u.parentElement;s(n.parent,u)&&(r=t(i.parentElement).children(n.selector))}else n.descendant?t(i).find(n.descendant.selectorData.selector).each(function(i,u){if(s(n.descendant,u))return r=t(u).parents(n.selector),!1}):r=t(n.selector);r&&v(n,r)&&(r.each(function(t,i){if(!p(i)){var u=t%n.elements.length,r=n.elements[u];r&&a(i,r)}}),n.isInTemplateLike||d(n))}return f(i)},s=function(n,t){return w(n.selectorData,t)==n},nt=function(n){for(var u,r,t=0;t<i.length;t++)if(u=i[t],u&&(r=w(i[t],n),r))return r;return null},e=function(n){var t=f(n);return t?t:nt(n)},l=function(n,t,i){if(n<r.length){var u=r[n];if(u)return{sourcePath:u,startPosition:t,length:i}}return null},y=function(t,i){t&&(i==null&&(i=!0),n.invoke("selectRange",t.sourcePath,t.startPosition,t.length,i))},tt=function(n,t,i){return n.sourcePath.toLowerCase()!=t.toLowerCase()?!1:n.startPosition>i?!1:i-n.startPosition>n.length?!1:!0},g=function(n,t,i){var r=n.start,f=n.length,o=r+f,e=n.startTag||0,s=r+e,u=t-i;r>=t?u>=o?(r=t,f=0,e=0):u>r?(f=o-u,r=t,e=u>=s?0:s-u):r+=i:s>t?(u>s?e=t-r:e+=i,u>o?f=t-r:f+=i):o>t&&(u>o?f=t-r:f+=i),n.start=r,n.length=f,n.startTag&&(n.startTag=e)},k=function(n,t){for(var f,e,i,r;t.length>=2;)for(f=t.shift(),e=t.shift(),i=0;i<u.length;i++)r=u[i],r.sourceIndex==n&&g(r,f,e)},c=function(t,i){if(t<r.length){var u=r[t];n.invokeAsync("getChangesInFile",u).continueWith(function(n){k(t,n),c(t+1,i)})}else i()};this.getCompleteRange=function(n){var t=e(n);return t?l(t.sourceIndex,t.start,t.length):null},this.getStartTagRange=function(n){var t=e(n);return t&&t.startTag?l(t.sourceIndex,t.start,t.startTag):null},this.selectCompleteRange=function(n){y(b.getCompleteRange(n))},this.selectStartTagRange=function(n){y(b.getStartTagRange(n))},this.canMapToSource=function(n){return e(n)!=null},this.ensureUpToDateAsync=function(n){n&&h.push(n),o||(o=!0,c(0,function(){var t=h,n;for(h=[],o=!1,n=0;n<t.length;n++)try{t[n]()}catch(i){}}))},this.getElementAtPosition=function(n,i){for(var f=null,o=null,r,e=0;e<u.length;e++)r=u[e],r.start<=i&&r.length>=i-r.start&&(f==null||f.length>r.length)&&(f=r);return f&&t(f.selectorData.selector).each(function(n,t){if(s(f,t))return o=t,!1}),o}}var l=!1,r=[],o=!0,h=[],u=[],i=[],f=function(n){return n?n.__browserLink_sourceMapping||null:null},p=function(n){return f(n)!=null},a=function(n,t){n&&(n.__browserLink_sourceMapping=t)},v=function(n,t){return n.isTemplateLike||n.isParentTemplateLike?t.length%n.elements.length==0:t.length==n.elements.length},c=function(n){var r,o,e,t,f,h,u,s;for(i.push(n),r=i.length-1;r<i.length;r++)for(o=i[r],e=0;e<o.elements.length;e++)if(t=o.elements[e],t){for(f=0;f<t.children.length;f++)h=t.children[f],i.push(h);for(u=0;u<t.ancestors.length;u++)s=t.ancestors[u],i.push(s)}},d=function(n){for(var t=0;t<i.length;t++)i[t]==n&&(i[t]=null)},nt=function(n){return t(n)},g=function(n,i){for(var u=t(n),f=i.split(">"),r=0;r<f.length;r++)u=u.children(f[r]);return u},b=function(n,i){return t(n).parents(i)},y=function(n,t){var i=t(n.selector);v(n,i)?(i.each(function(t,i){var o=t%n.elements.length,r=n.elements[o],u,f;r!=null&&(a(i,r),u=r.children,e(u,0,u.length,null,g.bind(null,i)),f=r.ancestors,e(f,0,f.length,null,b.bind(null,i)))}),n.isTemplateLike&&c(n)):c(n)},e=function(n,t,i,r,u){for(var f=t;f<t+i;f++){if(f>=n.length){r&&r();return}y(n[f],u)}t+i<n.length&&setTimeout(function(){e(n,t+i,i,r,u)},5)},w=function(n,t){e(n,0,10,t,nt)},s=function(n){var v=[],l,o,i,a,e,t,f,h,r,c;if(n)for(l=0;l<n.length;l++)for(o=n[l],i={selector:o[0],elements:[],isTemplateLike:!1},v.push(i),a=1;a<o.length;a++){if(e=o[a],t=null,e){for(f=e[0],h=e.length>=2?e[1]:{},t={selectorData:i,sourceIndex:f[0],start:f[1],length:f[2],startTag:f.length>=4?f[3]:null,children:s(h.children),ancestors:s(h.ancestors)},h.templateLike&&o.length==2&&(i.isTemplateLike=!0,i.isInTemplateLike=!0),r=0;r<t.children.length;r++)t.children[r].parent=t,t.children[r].isParentTemplateLike=i.isTemplateLike,t.children[r].isInTemplateLike=i.isInTemplateLike;for(c=0;c<t.ancestors.length;c++)t.ancestors[c].descendant=t;u.push(t)}i.elements.push(t)}return v};return n.addSharedService("sourceMapping",new k),{onConnected:function(){if(!l&&n.initializationData&&n.initializationData.requestId){var i="~/__browserLink/requestData/"+n.initializationData.requestId;n.invokeAsync("resolveUrl",i).continueWith(function(i){i&&t.ajax(i,{dataType:"json",data:{version:2},cache:!0,success:function(t){l=!0;var i=s(t.map);w(i,function(){n.invokeAsync("resolveSourceFilePaths",t.files).continueWith(function(t){r=t,o=!1,n.sourceMapping.ensureUpToDateAsync(null)})})}})})}}}})); } catch(e) { this.log("Invalid extension script encountered for extension 'Microsoft.VisualStudio.Web.BrowserLink.HtmlMappingExtensionFactory'."); return; }

I can ignore the error and the formview appears to work.

regular expression that does not accept empty filed or white spaces but only letters

$
0
0

I've added some asp:RegularExpressionValidator to my textboxes and the client needs to fill these textboxes and submit the result into a database but the problem is that I have:

<table style="position:relative; z-index:2; ">         <tr>                                <td><asp:Label ID="Label1" runat="server" Font-Bold="true" Font-Size="X-Large"  >FirstName :</asp:Label> </td><td><asp:TextBox ID="TextBox1" runat="server" style="width:auto;"></asp:TextBox></td><td><asp:Label ID="Label2" runat="server" Font-Bold="true" Font-Size="X-Large" >LastName :</asp:Label> </td><td><asp:TextBox ID="TextBox2" runat="server" style="width:auto;"></asp:TextBox></td></tr><tr><td><asp:RegularExpressionValidator Font-Size="Large" ForeColor="Red" ControlToValidate="TextBox1" ID="RegularExpressionValidator1" runat="server" ErrorMessage="Firstname must contain only letters" ValidationExpression="^[A-Za-z]*$"></asp:RegularExpressionValidator></td><td>&nbsp</td><td><asp:RegularExpressionValidator Font-Size="Large" ForeColor="Red" ControlToValidate="TextBox2" ID="RegularExpressionValidator2" runat="server" ErrorMessage="Lastname must contain only letters" ValidationExpression="^[A-Za-z]*$"></asp:RegularExpressionValidator></td><td>&nbsp</td></tr>

and if the client left the fields empty or added some white spaces he will be able to submit his response.  I need to stop this and I tried with regular expression validator but that didn't work and I didn't know how to use the custom validator it just didn't fire...

Any HELP plz!!


Multi Project Template folder structure incorrect

$
0
0
<div class="post-text" itemprop="description">

So i am trying to build a Multi Project template and when i set it up the folder structure is coming out incorrectly (Not how microsoft does it when creating projects) and it's messing things up like the Packages folder and References folder.

This is current Structure:

Solution Folder
-Solution File 
-Folder (Solution Name)
--Packages
--References 
--Project1 Folder
--Project2 Folder

I am wanting it to have the same structure that .NET does automatically:

SolutionFolder
-
SolutionFile
-ReferencesFolder
-
PackagesFolder
-Project1Folder
-Project2Folder

Here is my vstemplate:

<VSTemplateVersion="3.0.0"xmlns="http://schemas.microsoft.com/developer/vstemplate/2005"Type="ProjectGroup">
<TemplateData>
<Name>
ASP Solution Template</Name>
<Description>
This is the Solution Template for ASP Applications</Description>
<Icon>
__TemplateIcon.ico</Icon>
<ProjectType>
CSharp</ProjectType>
</TemplateData>
<TemplateContentBuildOnLoad="true">
<ProjectCollection>

<SolutionFolderName="References"></SolutionFolder>
<SolutionFolder
Name="packages"></SolutionFolder>
<ProjectTemplateLink
ProjectName="$safeprojectname$"> ASPTemplate\MyTemplate.vstemplate </ProjectTemplateLink>
<ProjectTemplateLink
ProjectName="$safeprojectname$.ClassLibrary"> ClassLibrary\MyTemplate.vstemplate </ProjectTemplateLink>
</ProjectCollection>
</TemplateContent>
</VSTemplate>
</div>

Unable to get Full support for asp.net mvc5 inside VS 2012 professional

$
0
0

I have VS 2012 professional, now when i am trying to create a new asp.net mvc5 web project , i only got this option "asp.net mvc5 empty project" as follow:-

https://onedrive.live.com/?cid=BFD0AD6F15EF78DD&id=BFD0AD6F15EF78DD!126&v=3

and i do not have options for creating intranet, internet or use the boostrap template. However inside my VS 2013 express i got more options for mvc5, as follow:-

https://onedrive.live.com/?cid=BFD0AD6F15EF78DD&id=BFD0AD6F15EF78DD!128&v=3

so i try to install the following http://www.asp.net/mvc/mvc5, which did not make any difference, also after i install the tool i start facing these problems;-

1 . sometimes when i want to create a new Controller class i will get the following error,( i have to close VS and re-open VS again each time) :-

https://onedrive.live.com/?cid=BFD0AD6F15EF78DD&id=BFD0AD6F15EF78DD!129&v=3

2 . if i create a new controller class , it will not be shown inside the Controller folder on the "Solution explorer", but if i navigate to the Vs project inside the C drive, i can see the controller class.

3 . i use to have some templates , which are not  available any more such as:-

https://onedrive.live.com/?cid=BFD0AD6F15EF78DD&id=BFD0AD6F15EF78DD!127&v=3

So i have these 2 questions:-

1. how to get full asp.net mvc5 support inside VS 2012 professional.

2. how to eliminate the above 3 problems raised after i installed the toolhttp://www.asp.net/mvc/mvc5?

aligning an image at the bottom of the page with relative position

$
0
0

I am trying to align my image at the bottom of the page while keeping the position relative and not absolute what I have is:

<body id="body1" runat="server" 
     style="background-color:#FFF8F8; padding:0px; margin:0px; min-height:100%; width:100%; position:absolute; top:0; bottom:0; right:0; left:0;"><form id="form1" runat="server" style=" position:absolute;padding:0px; margin:0px; width:100%; top:0; bottom:0; right:0; left:0;" >  <div  style=" position:absolute;padding:0px; margin:0px; width:100%; top:0; bottom:0; right:0; left:0;"><h1 style=" text-align:center; ">Create your account</h1><center>
there is some code here           </center>  <center>
there is some code here</center>   <br/><center >
there is some code here</center><div style="vertical-align:bottom; padding-bottom:0px; margin-bottom:0px; text-align:center"><asp:Image ID="Image5" runat="server" AlternateText="LOGO" 
              ImageUrl="FashionWebsiteDesignImgs/logo2.png"
                       style="width:885px; height:69px; position:relative; margin-bottom:0px; padding-bottom:0px; bottom:0px;left: 0px;" /> </div></div></form></body>

the image keeps showing at about 100px from the bottom it's like there are some margins or.. preventing it from being placed at the bottom;

any Help plz;

VS2013 Renames web project and links to IIS port 80 web site

$
0
0

We have a solution with a web site project in it. When we open the solution in VS2013 the project initially displays with the correct name (from the .sln file). After VS finishes with it's initialization process for the project the web site project displays in Solution Explorer with the name of the web site configured in IIS to respond tohttp://localhost:80. Additionally, this website gets reconfigured to point to the folder for the web site project. Our developers have various web sites from different solutions configured in their local IIS instance, how can we seperate the web project from IIS configuration or at least have the association be stored in a file that isn't source controlled and therefore has to be the same for all developers on a project?

Select an item from listview

$
0
0

I have a listview that contains items and each item has itemname and item price... when I select an item in the listview I need to get the name of this item how can I do this?

...<tr><td><asp:Label ID="Label8" Font-Size="Large" runat="server" Text="Item name:"  style="text-align:left" ></asp:Label><asp:Label ID="Label4" Font-Size="Large"  ForeColor="#CC3300" runat="server" Text='<%# Eval("ItemName") %>' style="text-align:left; font-style:italic;"></asp:Label></td></tr>
...

and the listview is filled like that:

try
                {
                    string con = ConfigurationManager.ConnectionStrings["DatabaseConnection"].ConnectionString;
                    SQLiteConnection cnn = new SQLiteConnection(con);
                    cnn.Open();
                    SQLiteDataAdapter com;  // create command
                    com = new SQLiteDataAdapter("Select * from Items where ItemCategory like '" + category + "' and ItemGroup like '" + group + "'", cnn);
                    DataSet ds = new DataSet();
                    com.Fill(ds);
                    ListView1.DataSource = ds;
                    ListView1.DataBind();
                    cnn.Close();
                }

Viewing all 3509 articles
Browse latest View live




Latest Images