Iteratively Perfecting
A Software Developer's notes along the way
Thursday, January 5, 2023
SQL Server: When was table last updated and other usage stats
Tuesday, November 1, 2022
Sunday, July 3, 2022
Azure Rookie Mistakes: Creating an Image from a VM will Generalize the source VM, bricking it
You won't be warned. It will both stop the source VM and worse, it will GENERALIZE it, meaning it removes all personal account info. This is irreversible.
Tuesday, June 14, 2022
Visual Studio roslyn csc.exe error : Try running VS as Admin
Try to build a newly added project and get:
bin\roslyn\csc.exe
?
Try running Visual Studio as Administrator.
Sunday, June 12, 2022
Request
AcceptTypes: {string[8]}
AnonymousID: null
AppRelativeCurrentExecutionFilePath: "~/Apply/FCC_Standard_1"
ApplicationPath: "/"
Browser: {System.Web.Mobile.MobileCapabilities}
ClientCertificate: {System.Web.HttpClientCertificate}
ContentEncoding: {System.Text.UTF8Encoding}
ContentLength: 11897
ContentType: "multipart/form-data; boundary=----WebKitFormBoundaryDmtGCaOzox2vBh7G"
Cookies: {System.Web.HttpCookieCollection}
CurrentExecutionFilePath: "/Apply/FCC_Standard_1"
CurrentExecutionFilePathExtension: ""
FilePath: "/Apply/FCC_Standard_1"
Files: {System.Web.HttpFileCollection}
Filter: {System.Web.HttpInputStreamFilterSource}
Form: {__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=9Zsr6u4%2flTUh2TKRaHFcaOb%2fglJP89ebqo%2bbxVjsAUGRiLGOzPNWHRdNETDuEql7pdWnVQaAgNRQKUCKCSwNRwMlIEwoCGnNgLD0y785cVeikYYLlfzNb%2flDJWpvyCZuc9YUn9siFtJe8GYf94bFWOwN90dyVf5GPgNsGpPBbNoykil5%2bEM7qxf99W%2fWlsB2HkylX1uqYjRVhqpK4KpKemuAKaMKlewd%2b5W2u......................................
vToCZT0xdJS9Oe9zT6atygIO9V8CZQOuLx36mMww%3d%3d&ctl00%24MainContent%24Submit=Submit}
Headers: {Cache-Control=max-age%3d0&Connection=keep-alive&Content-Length=11897&Content-Type=multipart%2fform-data%3b+boundary%3d----WebKitFormBoundaryDmtGCaOzox2vBh7G&Accept=text%2fhtml%2capplication%2fxhtml%2bxml%2capplication%......................................e%2fapng%2c*%2f*%3bq%3d0.8%2capplication%2fsigned-exchange%3bv%3db3%3bq%3d0.9&Accept-Encoding=gzip%2c+deflate%2c+br&Accept-Language=en-US%2cen%3bq%3d0.9&Cookie=__AntiXsrfToken%3df59b........................c+%22Chromium%22%3bv%3d%22102%22%2c+%22Google+Chrome%22%3bv%3d%22102%22&sec-ch-ua-mobile=%3f0&sec-ch-ua-platform=%22Windows%22&Upgrade-Insecure-Requests=1&Origin=http%3a%2f%2flocalhost%3a62848&Sec-Fetch-Site=same-origin&Sec-Fetch-Mode=navigate&Sec-Fetch-User=
%3f1&Sec-Fetch-Dest=document}
HttpChannelBinding: {System.Web.HttpChannelBindingToken}
HttpMethod: "POST"
InputStream: {System.Web.HttpInputStream}
IsAuthenticated: false
IsLocal: true
IsSecureConnection: false
LogonUserIdentity: {System.Security.Principal.WindowsIdentity}
Params: {__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=9Zsr6u4%2flTUh2TKRaHFcaOb%2fglJP89ebqo%2bbxVjsAUGRiLGOzPNWHRdNETDuEql7pdWnVQaAgNRQKUCKCSwNRwMlIEwoCGnNgL...........................................
FSLCC%2bpFKujl%2bYWb2Ni2lqqT8Xr5ByYmDybPo52OXrFFzbqbZlLqLhTAXe8vxMGZjxPkWs4NgH82hu2jjT8doKB3vpFgkiU19T5cXuK8OLT1j0yIR1ogk%2b5vSVcl2USMs8qyqeVn8dfldBZffw3sRz..............................
covToC......................Mww%3d%3d&ctl00%24MainContent%24Submit=Submit&__AntiXsrfToken=f59b1ef7e.........................52afe68dc82&ALL_HTTP=HTTP_CACHE_CONTROL%3amax-age%3d0%0d%0aHTTP_CONNECTION%3akeep-alive%0d%0aHTTP_CONTENT_LENGTH%3a11897%0d%0aHTTP_CONTENT_TYPE%3amultipart%2fform-data%3b+boundary%3d----WebKitFormBoundaryDmtGCaOzox2vBh7G%0d%0aHTTP_ACCEPT%3atext%2fhtml%2capplication%2fxhtml%2bxml%2capplication%2fxml%3bq%3d0.9%2cimage%2favif%2cimage%2fwebp%2cimage%2fapng%2c*%2f*%3bq%3d0.8%2capplication%2fsigned-exchange%3bv%3db3%3bq%3d0.9%0d%0aHTTP_ACCEPT_ENCODING%3agzip%2c+deflate%2c+br%0d%0aHTTP_ACCEPT_LANGUAGE%3aen-US%2cen%3bq%3d0.9%0d%0aHTTP_COOKIE%3a__AntiXsrfToken%3df59b1ef7e2f04abeb39b552afe68dc82%0d%0aHTTP_HOST%3alocalhost%3a62848%0d%0aHTTP_REFERER%3ahttp%3a%2f%2flocalhost%3a62848%2fApply%2fFCC_Standard_1%0d%0aHTTP_USER_AGENT%3aMozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f102.0.0.0+Safari%2f537.36%0d%0aHTTP_SEC_CH_UA%3a%22+Not+A%3bBrand%22%3bv%3d%
2299%22%2c+%22Chromium%22%3bv%3d%22102%22%2c+%22Google+Chrome%22%3bv%3d%22102%22%0d%0aHTTP_SEC_CH_UA_MOBILE%3a%3f0%0d%0aHTTP_SEC_CH_UA_PLATFORM%3a%22Windows%22%0d%0aHTTP_UPGRADE_INSECURE_REQUESTS%3a1%0d%0aHTTP_ORIGIN%3ahttp%3a%2f%2flocalhost%3a62848%0d%0aHTTP_SEC_FETCH_SITE%3asame-origin%0d%0aHTTP_SEC_FETCH_MODE%3anavigate%0d%0aHTTP_SEC_FETCH_USER%3a%3f1%0d%0aHTTP_SEC_FETCH_DEST%3adocument%0d%0a&ALL_RAW=Cache-Control%3a+max-age%3d0%0d%0aConnection%3a+keep-alive%0d%0aContent-Length%3a+11897%0d%0aContent-Type%3a+multipart%2fform-data%3b+boundary%3d----WebKitFormBoundaryDmtGCaOzox2vBh7G%0d%0aAccept%3a+text%2fhtml%2capplication%2fxhtml%2bxml%2capplication%2fxml%3bq%3d0.9%2cimage%2favif%2cimage%2fwebp%2cimage%2fapng%2c*%2f*%3bq%3d0.8%2capplication%2fsigned-exchange%3bv%3db3%3bq%3d0.9%0d%0aAccept-Encoding%3a+gzip%2c+deflate%2c+br%0d%0aAccept-Language%3a+en-US%2cen%3bq%3d0.9%0d%0aCookie%3a+__AntiXsrfToken%3df59b1ef7e2f04abeb39b552afe68dc82%0d%0aHost%3a+localhost%3a62848%0d%0aReferer%3a+http%3a%2f%2flocalhost%3a62848%
2fApply%2fFCC_Standard_1%0d%0aUser-Agent%3a+Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f102.0.0.0+Safari%2f537.36%0d%0asec-ch-ua%3a+%22+Not+A%3bBrand%22%3bv%3d%2299%22%2c+%22Chromium%22%3bv%3d%22102%22%2c+%22Google+Chrome%22%3bv%3d%22102%22%0d%0asec-ch-ua-mobile%3a+%3f0%0d%0asec-ch-ua-platform%3a+%22Windows%22%0d%0aUpgrade-Insecure-Requests%3a+1%0d%0aOrigin%3a+http%3a%2f%2flocalhost%3a62848%0d%0aSec-Fetch-Site%3a+same-origin%0d%0aSec-Fetch-Mode%3a+navigate%0d%0aSec-Fetch-User%3a+%3f1%0d%0aSec-Fetch-Dest%3a+document%0d%0a&APPL_MD_PATH=%2fLM%2fW3SVC%2f2%2fROOT&APPL_PHYSICAL_PATH=C%3a%5cUsers%5cSQ7tywgw287a%5csource%5crepos%5cRisingStars1%5cRisingStars1%5c&AUTH_TYPE=&AUTH_USER=&AUTH_PASSWORD=&LOGON_USER=&REMOTE_USER=&CERT_COOKIE=&CERT_FLAGS=&CERT_ISSUER=&CERT_KEYSIZE=&CERT_SECRETKEYSIZE=&CERT_SERIALNUMBER=&CERT_SERVER_ISSUER=&CERT_SERVER_SUBJECT=&CERT_SUBJECT=&CONTENT_LENGTH=11897&CONTENT_TYPE=multipart%2fform-data%3b+boundary%3d----WebKitFormBoundaryDmtGCaO
zox2vBh7G&GATEWAY_INTERFACE=CGI%2f1.1&HTTPS=off&HTTPS_KEYSIZE=&HTTPS_SECRETKEYSIZE=&HTTPS_SERVER_ISSUER=&HTTPS_SERVER_SUBJECT=&INSTANCE_ID=2&INSTANCE_META_PATH=%2fLM%2fW3SVC%2f2&LOCAL_ADDR=%3a%3a1&PATH_INFO=%2fApply%2fFCC_Standard_1&PATH_TRANSLATED=C%3a%5cUsers%5cSQ7tywgw287a%5csource%5crepos%5cRisingStars1%5cRisingStars1%5cApply%5cFCC_Standard_1&QUERY_STRING=&REMOTE_ADDR=%3a%3a1&REMOTE_HOST=%3a%3a1&REMOTE_PORT=52595&REQUEST_METHOD=POST&SCRIPT_NAME=%2fApply%2fFCC_Standard_1&SERVER_NAME=localhost&SERVER_PORT=62848&SERVER_PORT_SECURE=0&SERVER_PROTOCOL=HTTP%2f1.1&SERVER_SOFTWARE=Microsoft-IIS%2f10.0&URL=%2fApply%2fFCC_Standard_1&HTTP_CACHE_CONTROL=max-age%3d0&HTTP_CONNECTION=keep-alive&HTTP_CONTENT_LENGTH=11897&HTTP_CONTENT_TYPE=multipart%2fform-data%3b+boundary%3d----WebKitFormBoundaryDmtGCaOzox2vBh7G&HTTP_ACCEPT=text%2fhtml%2capplication%2fxhtml%2bxml%2capplication%2fxml%3bq%3d0.9%2cimage%2favif%2cimage%2fwebp%2cimage%2fapng%2c*%2f*%3bq%3d0.8%2capplication%2fsigned-exchange%3bv%3db3%3bq%3d0.9&HTTP_ACCEPT_ENCODI
NG=gzip%2c+deflate%2c+br&HTTP_ACCEPT_LANGUAGE=en-US%2cen%3bq%3d0.9&HTTP_COOKIE=__AntiXsrfToken%3df59b1ef7e2f04abeb39b552afe68dc82&HTTP_HOST=localhost%3a62848&HTTP_REFERER=http%3a%2f%2flocalhost%3a62848%2fApply%2fFCC_Standard_1&HTTP_USER_AGENT=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f102.0.0.0+Safari%2f537.36&HTTP_SEC_CH_UA=%22+Not+A%3bBrand%22%3bv%3d%2299%22%2c+%22Chromium%22%3bv%3d%22102%22%2c+%22Google+Chrome%22%3bv%3d%22102%22&HTTP_SEC_CH_UA_MOBILE=%3f0&HTTP_SEC_CH_UA_PLATFORM=%22Windows%22&HTTP_UPGRADE_INSECURE_REQUESTS=1&HTTP_ORIGIN=http%3a%2f%2flocalhost%3a62848&HTTP_SEC_FETCH_SITE=same-origin&HTTP_SEC_FETCH_MODE=navigate&HTTP_SEC_FETCH_USER=%3f1&HTTP_SEC_FETCH_DEST=document}
Path: "/Apply/FCC_Standard_1"
PathInfo: ""
PhysicalApplicationPath: "C:\\Users\\SQ7tywgw287a\\source\\repos\\RisingStars1\\RisingStars1\\"
PhysicalPath: "C:\\Users\\SQ7tywgw287a\\source\\repos\\RisingStars1\\RisingStars1\\Apply\\FCC_Standard_1"
QueryString: {}
RawUrl: "/Apply/FCC_Standard_1"
ReadEntityBodyMode: Classic
RequestContext: {System.Web.Routing.RequestContext}
RequestType: "POST"
ServerVariables: {ALL_HTTP=HTTP_CACHE_CONTROL%3amax-age%3d0%0d%0aHTTP_CONNECTION%3akeep-alive%0d%0aHTTP_CONTENT_LENGTH%3a11897%0d%0aHTTP_CONTENT_TYPE%3amultipart%..............................undaryDmtGCaOzox2vBh7G%0d%0aHTTP_ACCEPT%3atext%2fhtml%2capplication%2fxhtml%2bxml%2capplication%2fxml%3bq%3d0.9%2cimage%2favif%2cimage%2fwebp%2cimage%....................................n%2fsigned-exchange%3bv%3db3%3bq%3d0.9%0d%0aHTTP_ACCEPT_ENCODING%3agzip%2c+deflate%2c+br%0d%0aHTTP_ACCEPT_LANGUAGE%3aen-US%2cen%3bq%3d0.9%0d%0aHTTP_COOKIE%3a__AntiXsrfToken%3df59b1ef7e2f04abeb39b552afe68dc82%0d%0aHTTP_HOST%3alocalhost%..........................%0d%0aHTTP_REFERER%3ahttp%3a%2f%2flocalhost%3a62848%2fApply%2fFCC_Standard_1%0d%0aHTTP_USER_AGENT%3aMozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f102.0.0.0+Safari%2f537.36%0d%0aHTTP_SEC_CH_UA%3a%22+Not+A%3bBrand%22%3bv%3d%2299%22%2c+%22Chromium%22%3bv%3d%22102%22%2c+%22Google+Chrome%22%3bv%3d%22102%22%0d%0aHTTP_SEC_CH_UA_MOBILE%3a%3
f0%0d%0aHTTP_SEC_CH_UA_PLATFORM%3a%22Windows%22%0d%0aHTTP_UPGRADE_INSECURE_REQUESTS%3a1%0d%0aHTTP_ORIGIN%3ahttp%3a%2f%2flocalhost%3a62848%0d%0aHTTP_SEC_FETCH_SITE%3asame-origin%0d%0aHTTP_SEC_FETCH_MODE%3anavigate%0d%0aHTTP_SEC_FETCH_USER%3a%3f1%0d%0aHTTP_SEC_FETCH_DEST%3adocument%0d%0a&ALL_RAW=Cache-Control%3a+max-age%3d0%0d%0aConnection%3a+keep-alive%0d%0aContent-Length%3a+11897%0d%0aContent-Type%3a+multipart%2fform-data%3b+boundary%3d----WebKitFormBoundaryDmtGCaOzox2vBh7G%0d%0aAccept%3a+text%2fhtml%2capplication%2fxhtml%2bxml%2capplication%2fxml%3bq%3d0.9%2cimage%2favif%2cimage%2fwebp%2cimage%2fapng%2c*............................................%2fsigned-exchange%3bv%3db3%3bq%3d0.9%0d%0aAccept-Encoding%3a+gzip%2c+deflate%2c+br%0d%0aAccept-Language%3a+en-US%2cen%3bq%3d0.9%0d%0aCookie%3a+__AntiXsrfToken%3df59...............................2afe68dc82%0d%0aHost%3a+localhost%3a62848%0d%0aReferer%3a+http%3a%2f%2flocalhost%3a62848%2fApply%2fFCC_Standard_1%0d%0aUser-Agent%3a+Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64)+AppleWebKit%2f537.36
+(KHTML%2c+like+Gecko)+Chrome%2f102.0.0.0+Safari%2f537.36%0d%0asec-ch-ua%3a+%22+Not+A%3bBrand%22%3bv%3d%2299%22%2c+%22Chromium%22%3bv%3d%22102%22%2c+%22Google+Chrome%22%3bv%3d%22102%22%0d%0asec-ch-ua-mobile%3a+%3f0%0d%0asec-ch-ua-platform%3a+%22Windows%22%0d%0aUpgrade-Insecure-Requests%3a+1%0d%0aOrigin%3a+http%3a%2f%2flocalhost%3a62848%0d%0aSec-Fetch-Site%3a+same-origin%0d%0aSec-Fetch-Mode%3a+navigate%0d%0aSec-Fetch-User%3a+%3f1%0d%0aSec-Fetch-Dest%3a+document%0d%0a&APPL_MD_PATH=%2fLM%2fW3SVC%2f2%2fROOT&APPL_PHYSICAL_PATH=C%3a%5cUsers%5cSQ7tywgw287a%5csource%5crepos%5cRisingStars1%5cRisingStars1%5c&AUTH_TYPE=&AUTH_USER=&AUTH_PASSWORD=&LOGON_USER=&REMOTE_USER=&CERT_COOKIE=&CERT_FLAGS=&CERT_ISSUER=&CERT_KEYSIZE=&CERT_SECRETKEYSIZE=&CERT_SERIALNUMBER=&CERT_SERVER_ISSUER=&CERT_SERVER_SUBJECT=&CERT_SUBJECT=&CONTENT_LENGTH=11897&CONTENT_TYPE=multipart%2fform-data%3b+boundary%3d----WebKitFormBoundaryDmtGCaOzox2vBh7G&GATEWAY_INTERFACE=CGI%2f1.1&HTTPS=off&HTTPS_KEYSIZE=&HTTPS_SECRETKEYSIZE=&HTTPS_SERVER_ISSUER=&HTTPS_S
ERVER_SUBJECT=&INSTANCE_ID=2&INSTANCE_META_PATH=%2fLM%2fW3SVC%2f2&LOCAL_ADDR=%3a%3a1&PATH_INFO=%2fApply%2fFCC_Standard_1&PATH_TRANSLATED=C%3a%5cUsers%5cSQ7tywgw287a%5csource%5crepos%5cRisingStars1%5cRisingStars1%5cApply%5cFCC_Standard_1&QUERY_STRING=&REMOTE_ADDR=%3a%3a1&REMOTE_HOST=%3a%3a1&REMOTE_PORT=52595&REQUEST_METHOD=POST&SCRIPT_NAME=%2fApply%2fFCC_Standard_1&SERVER_NAME=localhost&SERVER_PORT=62848&SERVER_PORT_SECURE=0&SERVER_PROTOCOL=HTTP%2f1.1&SERVER_SOFTWARE=Microsoft-IIS%2f10.0&URL=%2fApply%2fFCC_Standard_1&HTTP_CACHE_CONTROL=max-age%3d0&HTTP_CONNECTION=keep-alive&HTTP_CONTENT_LENGTH=11897&HTTP_CONTENT_TYPE=multipart%2fform-data%3b+boundary%3d----WebKitFormBoundaryDmtGCaOzox2vBh7G&HTTP_ACCEPT=text%2fhtml%2capplication%2fxhtml%2bxml%2capplication%2fxml%3bq%3d0.9%2cimage%2favif%2cimage%2fwebp%2cimage%2fapng%2c*%2f*%3bq%3d0.8%2capplication%2fsigned-exchange%3bv%3db3%3bq%3d0.9&HTTP_ACCEPT_ENCODING=gzip%2c+deflate%2c+br&HTTP_ACCEPT_LANGUAGE=en-US%2cen%3bq%3d0.9&HTTP_COOKIE=__AntiXsrfToken%3df59b1ef7e2f04ab
eb39b552afe68dc82&HTTP_HOST=localhost%3a62848&HTTP_REFERER=http%3a%2f%2flocalhost%3a62848%2fApply%2fFCC_Standard_1&HTTP_USER_AGENT=Mozilla%2f5.0+(Windows+NT+10.0%3b+Win64%3b+x64)+AppleWebKit%2f537.36+(KHTML%2c+like+Gecko)+Chrome%2f102.0.0.0+Safari%2f537.36&HTTP_SEC_CH_UA=%22+Not+A%3bBrand%22%3bv%3d%2299%22%2c+%22Chromium%22%3bv%3d%22102%22%2c+%22Google+Chrome%22%3bv%3d%22102%22&HTTP_SEC_CH_UA_MOBILE=%3f0&HTTP_SEC_CH_UA_PLATFORM=%22Windows%22&HTTP_UPGRADE_INSECURE_REQUESTS=1&HTTP_ORIGIN=http%3a%2f%2flocalhost%3a62848&HTTP_SEC_FETCH_SITE=same-origin&HTTP_SEC_FETCH_MODE=navigate&HTTP_SEC_FETCH_USER=%3f1&HTTP_SEC_FETCH_DEST=document}
TimedOutToken: IsCancellationRequested = false
TlsTokenBindingInfo: null
TotalBytes: 11897
Unvalidated: {System.Web.UnvalidatedRequestValues}
Url: {http://localhost:62848/Apply/FCC_Standard_1}
UrlReferrer: {http://localhost:62848/Apply/FCC_Standard_1}
UserAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36"
UserHostAddress: "::1"
UserHostName: "::1"
UserLanguages: {string[2]}
Sunday, April 24, 2022
VS2017 Templates: ASP.NET Web Forms (and MVC): Bootstrap 3 to 4
Invaluable page here:
https://www.mytecbits.com/microsoft/dot-net/how-to-add-bootstrap-in-asp-net#WebFormsNuGet
So couple things:
1. Popper, how to get that included properly
2. The nav bar from the template is for BS3. Won't work with BS4.
Here's how the nav bar from template looks with BS4:
For Popper:
Go to Site.Master file and add the reference to popper.js either directly or by using BundleConfig and ScriptReference. (NOTE: Popper.js is needed only if you are using tooltips, popovers or dropdowns in bootstrap).
(Using Bootstrap 4.6.0)
Solved by adding the following to ScriptManager reference in Site.Master:
<asp:scriptReference Path="~/Scripts/umd/popper.min.js" />
For the nav bar, here's the old code you need to replace in Site.Master:
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" runat="server" href="~/">Application name</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a runat="server" href="~/">Home</a></li>
<li><a runat="server" href="~/About">About</a></li>
<li><a runat="server" href="~/Contact">Contact</a></li>
</ul>
<asp:LoginView runat="server" ViewStateMode="Disabled">
<AnonymousTemplate>
<ul class="nav navbar-nav navbar-right">
<li><a runat="server" href="~/Account/Register">Register</a></li>
<li><a runat="server" href="~/Account/Login">Log in</a></li>
</ul>
</AnonymousTemplate>
<LoggedInTemplate>
<ul class="nav navbar-nav navbar-right">
<li><a runat="server" href="~/Account/Manage" title="Manage your account">Hello, <%: Context.User.Identity.GetUserName() %> !</a></li>
<li>
<asp:LoginStatus runat="server" LogoutAction="Redirect" LogoutText="Log off" LogoutPageUrl="~/" OnLoggingOut="Unnamed_LoggingOut" />
</li>
</ul>
</LoggedInTemplate>
</asp:LoginView>
</div>
</div>
</div>
Replace with:
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="#">My Web Site</a>
<button class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbar" class="navbar-collapse collapse">
<ul class="navbar-nav mr-auto">
<li class="nav-item active"><a class="nav-link" href="/Default.aspx">Home</a></li>
<li class="nav-item"><a class="nav-link" href="#about">About</a></li>
<li class="nav-item"><a class="nav-link" href="#contact">Contact</a></li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="dropdown04″>Dropdown <span class="caret"></span></a>
<div class="dropdown-menu" aria-labelledby="dropdown04″>
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
</ul>
</div>
</nav>
=============
Here is the one you'd use if you have Accounts in your template:
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="#">My Web Site</a>
<button class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div id="navbar" class="navbar-collapse collapse">
<ul class="navbar-nav mr-auto">
<li class="nav-item active"><a class="nav-link" href="/Default.aspx">Home</a></li>
<li class="nav-item"><a class="nav-link" href="#about">About</a></li>
<li class="nav-item"><a class="nav-link" href="#contact">Contact</a></li>
<li class="nav-item">Login stuff to go here</li>
<asp:LoginView runat="server" ViewStateMode="Disabled">
<AnonymousTemplate>
<li class="nav-item"><a class="nav-link" runat="server" href="~/Account/Register">Register</a></li>
<li class="nav-item"><a class="nav-link" runat="server" href="~/Account/Login">Log in</a></li>
</AnonymousTemplate>
<LoggedInTemplate>
<li class="nav-item"><a class="nav-link" runat="server" href="~/Account/Manage" title="Manage your account">Hello, <%: Context.User.Identity.GetUserName() %> !</a></li>
<li class="nav-item">
<asp:LoginStatus class="nav-link" runat="server" LogoutAction="Redirect" LogoutText="Log off" LogoutPageUrl="~/" OnLoggingOut="Unnamed_LoggingOut" />
</li>
</LoggedInTemplate>
</asp:LoginView>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" id="dropdown04″">Dropdown <span class="caret"></span></a>
<div class="dropdown-menu" aria-labelledby="dropdown04″">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>
</ul>
</div>
</nav>
Thursday, April 21, 2022
SQL Server: get count of tables, views, stored procs, etc
NOTE: the sys is not in master, but in msdb. So the full name would be:
SELECT count(name) as spcount FROM msdb.sys.sysobjects WHERE xtype = 'P'
or
select * from [servername\instance].msdb.sys.sysobjects
===========================
SELECT count(name) as tablecount FROM sys.sysobjects WHERE xtype = 'U'
Below query will return the total number of views in sql server
SELECT count(name) as viewscount FROM sys.sysobjects WHERE xtype = 'V'
Below query will return the total number of stored procedures in sql server
SELECT count(name) as spcount FROM sys.sysobjects WHERE xtype = 'P'
Below query will return the total number of functions in sql server
SELECT count(name) as fncount FROM sys.sysobjects WHERE xtype = 'FN'
SELECT name FROM sys.sysobjects WHERE xtype = 'U'
SELECT name FROM sys.sysobjects WHERE xtype = 'V'
SELECT name FROM sys.sysobjects WHERE xtype = 'P'
SELECT name FROM sys.sysobjects WHERE xtype = 'FN'