|
how to add pdf file dynamically and download it through ancher tag in asp.net
|
|
|
|
|
|
I want to pass multiple parameters ( ID and Name ) to the autocomplete script. It works if i put only one parameter but not working with two parameters.
This is not working
<script type="text/javascript">function BindEvents() {
$(document).ready(function () {
$("#<%=txtID.ClientID%>")+$("#<%=txtName.ClientID%>").autocomplete('../../Common_Search/Employee.ashx');
});
}
</script> This is working
<script type="text/javascript">
function BindEvents() {
$(document).ready(function () {
$("#<%=txtID.ClientID%>").autocomplete('../../Common_Search/Employee.ashx');
});
}
</script>
modified 1-Sep-15 16:06pm.
|
|
|
|
|
That's not creating multiple parameters, that's appending two strings, so the ID that you would be creating would end up looking something like this - __$$txtID__$$txtName (I know, those aren't the actual characters that would be put in, but this is for demonstration) - so, the ID that the JavaScript would be looking for wouldn't exist anywhere on the page (BTW - this question has nothing to do with the .NET framework, you would have been better off posting this in the ASP.NET forum instead).
|
|
|
|
|
Hello,
We are trying to create an EntityDataModel project for Postgresql Database. When trying to make a connection to the Postgresql Database via ADO.NET EntityData Model New Connection button, the Data Source does not list Postgresql Data Source. Request you to please guide us as to how to go ahead so that we can have an entity Data Model for Postgresql Database.
Regards
Vineet More
|
|
|
|
|
|
Hi.
I run a ASP.NET web site.This web site need authentication people with Microsoft ActiveDirectory.Threr are more than 500 thousand user ,10 thousand OrganizationUnit on the Domain Controller.
I wrote a function to validate people in a static class:
static public string ValidateCredentials(string userName, string password)
{
string result = null;
try
{
log4net.ILog log = log4net.LogManager.GetLogger("Login.Aspx");
DateTime time0 = DateTime.Now;
PrincipalContext principalContext = new PrincipalContext(ContextType.Domain, StsDomainName, StsAdRootOu + "," + StsDomainDn , ContextOptions.SimpleBind,StsAdUserName, StsAdUserPswd);
if (principalContext.ValidateCredentials(StsDomainShrotName +"\\" + userName, password,ContextOptions.SimpleBind))
result = "1";
else
result = "0";
log.Debug("Time cost:" + (DateTime.Now - time0).TotalMilliseconds + "DC:" + principalContext.ConnectedServer);
}
catch (Exception e)
{
result = e.Message;
}
return result;
During hign concurrency scence, more than 2000 user login the web site at the same time. I found it cost a long time to do the validation.
But if i dim the principalContext as a static member of the class,the time cost on validation will be cut down.But the CPU usage on the web site server will raise to 90%.
anyone can help me to improve my code
|
|
|
|
|
Please use the ASP.NET forum.
|
|
|
|
|
Object Reference not set to instance of an object at Program.main(string[] args)
|
|
|
|
|
That means you are doing something with an object that has not been created. If you post the code we can take a look, but without code we can only guess.
Once the exception is thrown, it will say on which line it went wrong. Try running from the debugger.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
class Program
{
static void Main(string[] args)
{
if (args.Length > 0)
{
string Param = args[0];
Add(param);
}
}
}
|
|
|
|
|
Looks good; the error must be occurring in the "Add" method.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
What parameters did you pass in your CMD window?
|
|
|
|
|
class Program
{
static void Main(string[] args)
{
if ((args != null) && (args.Length > 0))
{
string param = args[0];
Add(param);
}
}
}
while (true) {
continue;
}
|
|
|
|
|
|
|
That's just a link to the email confirmation page.
That isn't code...did you mean to post something totally different, or do you need to explain your problem as well as post a link? Because at the moment, this is not understandable in any way as a question we can answer.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
My Edit page won't do any changes to the database. I'm sure that my code is right. However it won't make any changes! I'm using Entity framework code first.
HttpPost]
public ActionResult Edit(User user, int? Id)
{
var userInfo = db.Users.SingleOrDefault(s => s.UserId == Id);
if (userInfo != null)
{
db.SaveChanges();
}
return View();
}
}
|
|
|
|
|
Member 11929022 wrote: I'm sure that my code is right
You sure about that?
The biggest problem I see is that you go and get a user object from the database using its ID to look it up. Then you "SaveChanges" to the database, but you haven't made any!
The controller apparently gets a User object from the caller, but you never use it in the method at all.
|
|
|
|
|
Are you using the Scaffholding entity framework techniques like create update delete and read operations which will actually make changes to the database??..
please apply those methods instead of db.SaveChanges(); as those are mainly integrated to perform CRUD operations on database and more over in your present code you are just reading the values from database and not updating or inserting anything and how you expect to commit changes to database bro? Think about it ok.
|
|
|
|
|
While running R.Net code in Visual Studio I am facing issues in closing instance of REngine object. Although I am using engine.dispose() method after calling R script through command line, but while rerunning the code instance is still running and throwing error. Any help suggested?
|
|
|
|
|
Member 11925265 wrote: Any help suggested? Well, you could start by explaining what error, and showing the line(s) of code where it occurs.
|
|
|
|
|
Please explain the error message with screenshot to provide you the answer.
|
|
|
|
|
I need to develop Intranet web application, using MVC 3,
Please help me out with MVC 3 , and basics websites
Aswini
|
|
|
|
|