|
|
I need a OneWire Library to use in vb.net 2017.
a library wich Had emplimented the hole protocol as do Dallas for Ardino .
Thanks to your helps .
|
|
|
|
|
|
I need one implement the ptotocol in vb.net these are using he protocol.
thanks to your help.
|
|
|
|
|
Hi All, Hope you all Fine
I Create a controller (Account ), with 3 Action Result(Main Login Page,Login,register)as the bellow code:
public class AccountController : Controller
{
public ActionResult MainLoginPage()
{
return View();
}
public ActionResult Login()
{
return View();
}
[HttpPost]
public ActionResult Login(UserInfo user)
{
if (Membership.ValidateUser(user.UserName, user.Password))
{
FormsAuthentication.SetAuthCookie(user.UserName, false);
return RedirectToAction("HomePage", "Home");
}
else
{
ModelState.AddModelError("", "Login details are wrong.");
}
return View(user);
}
public ActionResult Register()
{
return View();
}
[HttpPost]
public ActionResult Register(UserInfo user)
{
if (ModelState.IsValid)
{
Membership.CreateUser(user.UserName, user.Password, user.Email);
return RedirectToAction("HomePage", "Home");
}
else
{
ModelState.AddModelError("", "already registered.");
}
return View();
}
I create one main View(MainLoginPage)which contain two Partial Views(_login,_Register) as follow:.
@{
ViewBag.Title = "MainLoginPage";
}
@section PageHeader
{
<link href="~/Content/Css/Login.css" rel="stylesheet" />
<link href="~/Content/Css/animation.css" rel="stylesheet" />
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
}
<pre>
<div class="wrapper">
<div id="login" class="animate form">
@{
Html.RenderPartial("_Login"); }
</div>
<div id="register" class="animate form">
@{ Html.RenderPartial("_Register"); }
</div>
</div>
_Login
@model myWebsite.Models.UserInfo
@using (Html.BeginForm("Login", "Account", FormMethod.Post))
{
<pre>
@Html.AntiForgeryToken() @*The anti-forgery token can be used to help protect
your application against cross - site request forgery.*@
@Html.ValidationSummary(true, "Login Failed, check details");
<label data-icon="u"> </label>
@Html.TextBoxFor(user => Model.UserName, new { placeholder = "username" })
@Html.ValidationMessageFor(user => Model.UserName)
<label data-icon="p"> </label>
@Html.PasswordFor(user => Model.Password, new { placeholder = "password" })
@Html.ValidationMessageFor(user => Model.Password@*,"*"*@)
_Register
code similar to Login
When login with valid user it work probably but My problem is when in enter invalid login details it showing the following Error:
Server Error in '/' Application.
The view 'Login' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Account/Login.aspx
~/Views/Account/Login.ascx
~/Views/Shared/Login.aspx
~/Views/Shared/Login.ascx
~/Views/Account/Login.cshtml
~/Views/Account/Login.vbhtml
~/Views/Shared/Login.cshtml
~/Views/Shared/Login.vbhtml
It seem that searching for the view login while login is Partial(_Login)
Could You please advice me
Note:
Quote: It work probably when I work on it as normal view not as partial view
modified 6-Jul-17 7:27am.
|
|
|
|
|
When you call the View method[^] without specifying a view name, it tries to find a view that matches the action name. You can see the list of views it looked for in the error message.
The problem is, you don't have a view called either Login or Register , so when you call View from those actions, it won't be able to find a matching view.
You can either add the missing views:
Login.cshml:
@{
ViewBag.Title = "Login";
}
@section PageHeader
{
<link href="~/Content/Css/Login.css" rel="stylesheet" />
<link href="~/Content/Css/animation.css" rel="stylesheet" />
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
}
@{ Html.RenderPartial("_Login"); }
Register.cshtml:
@{
ViewBag.Title = "Register";
}
@section PageHeader
{
<link href="~/Content/Css/Login.css" rel="stylesheet" />
<link href="~/Content/Css/animation.css" rel="stylesheet" />
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
}
@{ Html.RenderPartial("_Register"); }
Or, you can specify the view name:
public class AccountController : Controller
{
public ActionResult MainLoginPage()
{
return View();
}
[HttpPost]
public ActionResult Login(UserInfo user)
{
if (Membership.ValidateUser(user.UserName, user.Password))
{
FormsAuthentication.SetAuthCookie(user.UserName, false);
return RedirectToAction("HomePage", "Home");
}
ModelState.AddModelError("", "Login details are wrong.");
return View("MainLoginPage", user);
}
[HttpPost]
public ActionResult Register(UserInfo user)
{
if (ModelState.IsValid)
{
MembershipCreateStatus status;
Membership.CreateUser(user.UserName, user.Password, user.Email, null, null, true, out status);
switch (status)
{
case MembershipCreateStatus.Success:
{
return RedirectToAction("HomePage", "Home");
}
case MembershipCreateStatus.InvalidUserName:
{
ModelState.AddModelError(nameof(UserInfo.UserName), "Invalid username.");
break;
}
case MembershipCreateStatus.InvalidPassword:
{
ModelState.AddModelError(nameof(UserInfo.Password), "Invalid password.");
break;
}
case MembershipCreateStatus.InvalidEmail:
{
ModelState.AddModelError(nameof(UserInfo.Email), "Invalid email address.");
break;
}
case MembershipCreateStatus.DuplicateUserName:
{
ModelState.AddModelError(nameof(UserInfo.UserName), "Already registered.");
break;
}
case MembershipCreateStatus.DuplicateEmail:
{
ModelState.AddModelError(nameof(UserInfo.Email), "Already registered.");
break;
}
case MembershipCreateStatus.UserRejected:
{
ModelState.AddModelError("", "User rejected.");
break;
}
default:
{
ModelState.AddModelError("", "Unknown error.");
break;
}
}
}
return View("MainLoginPage");
}
}
NB: In this case, you'll also want to remove the GET versions of Login and Register , since you don't have separate views for them.
You also need to verify the status when registering a new user, using the MembershipCreateStatus enum.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I add this
return View("MainLoginPage", user);
line and it work fine in Login Form, but in registration form still I face problem Since both forms are in same view.
and when the page load, only Login form appear till I click on link go to register login form disappear and register form appear with some fade animation,,
now I add the line in Register
return View("MainLoginPage", user);
when already registered it return to login form and already register error appear there..
<div class="container">
<a class="hiddenanchor" id="toregister"></a>
<a class="hiddenanchor" id="tologin"></a>
<pre>
<div class="wrapper">
<div id="login" class="animate form">
@{ Html.RenderPartial("_Login"); }
</div>
<div id="register" class="animate form">
@{ Html.RenderPartial("_Register"); }
</div>
</div>
|
|
|
|
|
Then you'll need to add something to tell whatever script or CSS you're using to switch between the forms that the register form should be active instead of the login form.
Since you haven't shared that part of the code, I can't tell you how to do that.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
It switch between the forms probably, and successfully registered users. But the only problem in handling the Error like if user is exist it goes to login form instead and error appear there.
the animation is done in css
.wrapper p.change_link a {
display: inline-block;
font-weight: bold;
padding: 3px 6px;
color:#ffffff;
margin-left: 10px;
text-decoration: none;
-webkit-transition: all 0.4s linear;
-moz-transition: all 0.4s linear;
-o-transition: all 0.4s linear;
-ms-transition: all 0.4s linear;
transition: all 0.4s linear;
}
.change_link
{
font-weight:550;
margin-left: 30px;
color:#23C1B0;
font-family: "Trebuchet MS","Myriad Pro",Arial,sans-serif;
font-size:17px;
}
<h1>toregister:target ~ .wrapper #register,</h1>
<h1>tologin:target ~ .wrapper #login{</h1>
z-index: 22;
-webkit-animation-delay: .6s;
-webkit-animation-timing-function: ease-in;
-moz-animation-delay: .6s;
-moz-animation-timing-function: ease-in;
-o-animation-delay: .6s;
-o-animation-timing-function: ease-in;
-ms-animation-delay: .6s;
-ms-animation-timing-function: ease-in;
animation-delay: .6s;
animation-timing-function: ease-in;
-webkit-animation-name: scaleIn;
-moz-animation-name: scaleIn;
-ms-animation-name: scaleIn;
-o-animation-name: scaleIn;
animation-name: scaleIn;
}
#toregister:target ~ .wrapper #login,
<h1>tologin:target ~ .wrapper #register{</h1>
-webkit-animation-timing-function: ease-out;
-moz-animation-timing-function: ease-out;
-o-animation-timing-function: ease-out;
-ms-animation-timing-function: ease-out;
animation-timing-function: ease-out;
-webkit-animation-name: scaleOut;
-moz-animation-name: scaleOut;
-ms-animation-name: scaleOut;
-o-animation-name: scaleOut;
animation-name: scaleOut;
}
here is the place of change link
@using (Html.BeginForm("Register", "Account", FormMethod.Post))
{<br />
@Html.AntiForgeryToken()
@Html.ValidationSummary(true, "Registeration Failed, fields.");
<pre>
<label data-icon="u"> </label>
@Html.EditorFor(user => Model.UserName, new { htmlAttributes = new { @class = "form-control", placeholder = "username" } })
@Html.ValidationMessageFor(user => Model.UserName)
<label data-icon="e"> </label>
@Html.EditorFor(user => Model.Email, new { htmlAttributes = new { @class = "form-control", placeholder = "mymail@mail.com" } })
@Html.ValidationMessageFor(user => Model.Email)
<label data-icon="p"> </label>
@Html.EditorFor(user => Model.Password, new { htmlAttributes = new { @class = "form-control", placeholder = "password" } })
@Html.ValidationMessageFor(user => Model.Password)
<input type="submit" value="Sign Up">
<p class="change_link"> Already a member ?<a href="#tologin" class="to_register"> Log in </a></p</pre>
modified 6-Jul-17 14:09pm.
|
|
|
|
|
The simplest solution is probably to modify your form so that it includes the anchor in its action attribute:
@using (Html.BeginForm(null, null, null, FormMethod.Post, new { @action = Url.Action("Register", "Account") + "#toregister" })
{
...
}
(Based on this StackOverflow answer[^].)
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
It work. It return to register but still not in a good way..
Can I control this with Script??
|
|
|
|
|
What does "not in a good way" mean?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I mean still need improvement. I hope that I can share my project with u if its it is possible.
|
|
|
|
|
If you can't explain the problem, then I don't see how we can help you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
If you can't explain the problem to people, how the $*%^ are you going to explain to the computer what to do to fix it? The computer is FAR more picky about it.
|
|
|
|
|
Hi I am newbie programmer and learning how to code using ASP.Net MVC. I have a simple project for clinic management. Im having trouble how to start doing invoice or something on how to print something like a certificate, receipt or doctor's prescription. I have this idea where you print a page but I think it's not the best way or practice. Sorry for the lousy problem.
How can I achieve this in the best way?
|
|
|
|
|
On the "server side", you create the invoice / report using any tool that can output HTML, PDF, DOCX (and optionally CSV, XLS). This include .Net reporting components, SQL Server reporting services.
The user / client then typically "downloads" the "type" of document they want; with you optionally emailing the stuff (reminders; tracking notices; receipts).
An actual "print" button (usually only found on bank sites, etc) would involve client side code; e.g. Javascript. (Something I would leave last / choose to ignore ... ugh).
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Hi,
I am calling SSIS package from a Console Application, it was working fine until I need to change my Laptop, after I changed it, it started giving me these errors:
Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.
This problem is happening when I am loading the package using Application object
_Pkg = _app.LoadFromSqlServer(PkgLocation, TargetServer=""server name", User Name=String.Empty (because Windows Auth), Password=String.Empty (because Windows Auth), null);
And this was working fine up until I had new laptop, but there could be Softwares mismatch between two Laptops but I have make it working. Note: and these all Packages are upgraded from SSIS 2008 to Data tools 2012.
I needed to remov and add back the Microsoft.SqlServer.DTSRuntimeWrap.DLL and Microsoft.SqlServer.ManagedDTS.DLL both the dlls to my machine, I have added them from GAC and as well as from the local folder after copying it to test different times but didn't help me much, in both the cases it was not running, throwing me the same error.
The only difference I could think of is I was having the SQL Server 2008 Integration Services installed on my previous machine but in the new machine I installed later but the evaluation version as it is difficult for me to get permission from our IT to install the Software in my Company, could it be the problem?
I am very much disappointed because this was working and has stopped sudden and I need to fix this issue urgently as I need to make changes to this app.
Any help a good suggestion, a link or Code snippet any thing would be very helpful - thanks in advance my friends.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
-- modified 29-Jun-17 20:19pm.
|
|
|
|
|
One possibility...
The package location either does not exist or the default user does not have access to it.
|
|
|
|
|
Hi folks,
I am using VB.net for my project . I have to implement calendar part using radscheduler but I am struggle with it , in day view of radscheduler always showing 24 slots per day even using group by option and used minutesperrow as 1440(24hrs) but still it showing 2 time slots per day 1st is today and 2nd is next day , I want to show only 1 slot in day view please help me to find a right way, thanks in advance.
|
|
|
|
|
Have you tried their support?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
|
That is not relevant. You are using a commercial product, which is supported by said company. Telerik is more likely to know their own buttons than a general forum on software.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I dono where to find it , help me to get it.
|
|
|
|
|
|