Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

Pranav Thakur

@Pranav Thakur
About
Posts
15
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to call unmanaged C++ DLL in C#.NET
    P Pranav Thakur

    Hi, I have coded few methods in C++ language. These methods are to be used in C#.NET . I guess I need to convert the .CPP file(C++ code) into DLL and then import the methods in C#. I made a Win32 project and converted the exe(C++ code) into unmanaged C++ DLL. Then I tried to call its method in C#.NET as : using System.Runtime.InteropServices; public partial class CDLL : System.Web.UI.Page { [DllImport("C:\\Project1\\TestProject\\Debug\\TestProject.dll", EntryPoint = "testMethod", ExactSpelling = false, CallingConvention = CallingConvention.Cdecl)] public static extern void testMethod(); protected void Page_Load(object sender, EventArgs e) { testMethod(); } } After running the above code i am getting error like : Unable to find an entry point named 'testMethod' in DLL 'C:\Project1\TestProject\Debug\TestProject.dll'. Can any one suggest how to run the above code successfully. Thanks.

    C# csharp c++ design debugging help

  • AjaxControlToolkit.dll in .NET 3.5 MVC application.
    P Pranav Thakur

    Hi, I am trying to use AjaxControlToolKit in .NET 3.5 MVC application but I am getting the error:- Could not load file or assembly 'AjaxControlToolkit.dll' or one of its dependencies. The system cannot find the file specified Following are the steps I performed:- 1)Added AjaxControlToolKit dll in bin folder 2)In aspx page <%@ Register Assembly="AjaxControlToolkit.dll" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>; Same code is running fine in .NET 3.5 if I don't go for MVC architecture. Please suggest some idea. Thanks.

    LINQ

  • SSIS package
    P Pranav Thakur

    Hi, I have successfully implemented insert/update logic in my SSIS pacakge. If a new project id is found in the source file then I insert a new row in the database table. If an existing project id is found then I update the corresponding row in the table. The above logic work fine but not in case if there is multiple identical project ids in the source file. The update logic fails in this case. I though of deleting and then inserting the rows for update logic but could not do so. Can anyone help. I am using lookup control and contional split control for identifing the existence of a new row or existing row.

    ASP.NET database sql-server help announcement

  • Set Focus
    P Pranav Thakur

    I am using a footer of a datagrid to add a row. After adding I want to set the focus on the first control of the footer.How can I achieve this.The following code is not working: protected void gdViewCompliance_ItemCommand(object source, DataGridCommandEventArgs e) { if (e.CommandName == "Add") { Some code here ((TextBox)e.Item.FindControl("txtFtExeName")).Focus() } }

    ASP.NET question

  • select values from a table dyunamically in Stored procedure
    P Pranav Thakur

    Hi, I have created a "test" table having 4 column Q1,Q2,Q3 and Q4 with values one,two,three,and four respectively. Please refer the code below:- Declare @loopId int set @loopId=1 Declare @vr varchar(100) declare @variable varchar(100) while @loopId<=4 begin set @vr='Q'+''+Convert(varchar,@loopId)+'' Select @variable=@vr from test print(@variable ) set @loopId=@loopId+1 end In the above code I am printing the values of each column of table "test" one by one.But the out put of the above code is Q1 Q2 Q3 Q4 but i want to have the values not column name.This is a sample code which I will be using in one of my stored proc.What wrong I am doing.Please help.

    Database database help

  • document.getElementById("") javascript ASP.NET.
    P Pranav Thakur

    i declared a global variable like this: string ddl=""; then in page load i wrote the following line: ddl = ddlCountry.ClientID; now in javascript i write like : var DrpDwn = document.getElementById("ddl"); alert(DrpDwn). Above is code is not working.What is wrong I am doing.Remember ddlCountry is inside wizard control.

    ASP.NET csharp javascript asp-net

  • document.getElementById("") javascript ASP.NET.
    P Pranav Thakur

    Hi, I want to getElementById of a control which is inside a Wizard control in ASP.NET 2.0. My code is like : var ddl=document.getElementById("ddlCountry"); if my ddlCountry is inside a Wizard control then how I will get the control by getElementById("").The above code works fine if ddlCountry is not inside wizard control.If it is inside wizard control then the above code does not work.

    ASP.NET csharp javascript asp-net

  • single instance of a Web applicaiton.
    P Pranav Thakur

    Hi, I am working on web applicaiton. I have uploaded the application on server but I want only one person can access the applicaiton at a time. In other words I want only a single instance of my applicaiton running at a time.Remember I am on web applicaiton not window applicaiton.

    ASP.NET sysadmin

  • single instance of an application using Application start in global.asax.
    P Pranav Thakur

    Hi, Can any one suggest me how to maitain a single instace of an application using Application start method of Global.asax.

    ASP.NET tutorial

  • Saving User Name And Password.
    P Pranav Thakur

    Thanks for your reply. Actually I want to know other better ways to save username and password without using cookies.Please help.

    ASP.NET help

  • Saving User Name And Password.
    P Pranav Thakur

    Hi, I have written a code to save username and password on client machien using cookie.The code is as follows:- HttpCookie loginCookie = new HttpCookie("logCoockie"); if (this.Login1.RememberMeSet) { //Check if the browser support cookies if ((Request.Browser.Cookies)) { //Check if the cookie with name LoginCookie exist on user's machine //if (loginCookie == null) //{ //Create a cookie with expiry of 30 days loginCookie.Expires = DateTime.Now.AddDays(30); //Write username to the cookie loginCookie.Values.Add("UNAME", this.Login1.UserName.ToString()); //Write password to the cookie loginCookie.Values.Add("UPASS", this.Login1.Password.ToString()); //} //If the cookie already exist then wirte the user name and password on the cookie //else //{ // loginCookie.Values.Add("UNAME",this.Login1.UserName.ToString()); // loginCookie.Values.Add("UPASS",this.Login1.Password.ToString()); //} } Response.Cookies.Add(loginCookie); } else { Response.Cookies["logCoockie"].Expires = DateTime.Now.AddDays(-3); } But it is not recommended to save such information in cookie.Can anyone help to use any alternative way to save such inforamtion. Thanks.

    ASP.NET help

  • Login Control in Visual Studio 2005
    P Pranav Thakur

    I have written some code.But its incompleate. Please explain me in detail how to go ahead from here. protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) { if (this.Login1.RememberMeSet) { //Check if the browser support cookies if ((Request.Browser.Cookies)) { //Check if the cookie with name PBLOGIN exist on user's machine if ((Request.Cookies["PBLOGIN"] == null)) { //Create a cookie with expiry of 30 days Response.Cookies["PBLOGIN"].Expires = DateTime.Now.AddDays(30); //Write username to the cookie Response.Cookies["PBLOGIN"].Values["UNAME"] = this.Login1.UserName.ToString(); //Write password to the cookie Response.Cookies["PBLOGIN"].Values["UPASS"] = this.Login1.Password.ToString(); } //If the cookie already exist then wirte the user name and password on the cookie else { Response.Cookies["PBLOGIN"].Values["UNAME"] = this.Login1.UserName.ToString(); Response.Cookies["PBLOGIN"].Values["UPASS"] = this.Login1.Password.ToString(); } } } }

    ASP.NET csharp visual-studio question

  • Login Control in Visual Studio 2005
    P Pranav Thakur

    Hi, Please any one explain me in detail how can I make use of "Remember me next time" option for Login Control. Thanks.

    ASP.NET csharp visual-studio question

  • Singleton Pattern
    P Pranav Thakur

    Ok, my purpose was to understand singleton pattern with some live example.Can anyone please explain this singleton pattern with suitable example.

    ASP.NET help design sysadmin beta-testing regex

  • Singleton Pattern
    P Pranav Thakur

    Hi, I want to open only one PDF file using singleton pattern.I have written a code as follows on button click event:- FileInfo objFile; string strFileName; strFileName = "User Manual - Quality Feedback System.pdf"; objFile = new FileInfo(Server.MapPath(ConfigurationSettings.AppSettings["App_Name"]) + "\\" + strFileName); Response.Clear(); Response.ContentType = "application/octet-stream"; Response.AppendHeader("Content-Disposition", "attachment; filename=" + objFile.Name); Response.Flush(); Response.WriteFile(objFile.FullName); Response.End(); The problem with the above code is that it opens more than one PDF file if button is clicked more than once.How can I make sure that one PDF file gets opened using Singleton design pattern.I am clear with the concept of singleton pattern but I am not able to implement this concept in my problem.Please help.

    ASP.NET help design sysadmin beta-testing regex
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups