|
Gerry Schmitz wrote: Leave 4.5 alone and install the 4.0 frameworks from the Microsoft sites.
That's not going to work - 4.5 is an "in-place upgrade" to 4.0, so you can't have both on the same machine.
Everything that works in 4.0 is supposed to work in 4.5, so there's no need to try to install 4.0 as well.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Fair enough. Thanks.
I suppose then he should try re-installing 4.5 in case the installation is corrupted.
Better yet, get the app source code and debug it.
|
|
|
|
|
there is a method to compute bell curves in vb.net how to excel
Thanks in advance
|
|
|
|
|
Uhhh....what?
If you're looking for a method in the .NET Framework to calculate a Bell curve, there isn't one.
You can try and write your own, the description of which can be found here[^].
|
|
|
|
|
Hi,
I have a VB.NET winforms application which I distribute from my website and recently I am getting some issues reported which may be a build problem. The computer I use to create the application and installer (I use Inno Setup) is windows 7 with a .NET 4.5 framework and built with VS 2013. My application only targets the .NET 3.5 framework. The computer I used to build the application with used VS2008 but since I migrated to vs2013 there are some weird graphical problems, such as GDI not working properly (some lines are not being drawn properly), some file location issues and problems with My.Settings.
Incidentally, I have vs2010 installed where I work and that doesn't have any problems.
Any help would be greatly appreciated. I don't really want to go back to vs2008 but I will if it's the only option.
|
|
|
|
|
Since we know nothing at all about your code it's impossible to tell you what's happening.
What I can tell you is that it has nothing to do with the version of Visual Studio you're using.
|
|
|
|
|
Dave Kreskowiak wrote: Since we know nothing at all about your code it's impossible to tell you what's happening. Yes I appreciate that, but it was more of a framework question rather than specific code.
I'm relieved that Visual Studio isn't to blame (in this instance!).
|
|
|
|
|
Member 10112720 wrote: ome weird graphical problems ... Without specific details it is anyone's guess what might be happening. You need to collect much more detailed information from your users as to exactly what happens, and under what circumstances.
|
|
|
|
|
Hi All,
i am working on windows based application need help can anyone tell how to generate Licence key for my application to specific machine(means if install my application setup on one system then user can not install this application setup to another machine).
Thanks.
|
|
|
|
|
|
Hi,
As i am fresher in ADO.NET so, i don't know what should be asked on Machine Round Test on interview.
Can anyone help?
Thanks...
|
|
|
|
|
Never heard of it. Did you do any searching?
|
|
|
|
|
Answering a few stock questions will not help you pass an interview. You need to fully understand the subject.
|
|
|
|
|
Hi,
How to get data from Multiple Tables and display it in single Grid view.
|
|
|
|
|
Execute a query. Or multiple.
What did you try and where are you stuck? This sounds like a very generic beginners' question, and without additional information, I'd suggest you try Googeling for examples.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
HI,
This is my code but this code is not working,that means it
not displaying data from tables in Grid view.
Default.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
public partial class _Default : System.Web.UI.Page
{
String a, b;
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack == false)
{
bindGrid();
}
SqlConnection con = new SqlConnection(Class1.Con_String);
con.Open();
SqlCommand cmd = new SqlCommand("Select Department_ID,Department from Department_Master", con);
SqlDataReader dr = cmd.ExecuteReader();
ddldept.DataSource = dr;
ddldept.DataBind();
con.Close();
bindGrid();
}
void bindGrid()
{
SqlConnection con1 = new SqlConnection(Class1.Con_String);
con1.Open();
SqlCommand cmd1 = new SqlCommand("Select Designation_ID,Designation from Designation_Master", con1);
SqlDataReader dr1 = cmd1.ExecuteReader();
ddldesg.DataBind();
con1.Close();
SqlConnection con11 = new SqlConnection(Class1.Con_String);
con11.Open();
String cmd11 = "Select Employee_Master.Emp_ID,Employee_Master.Emp_Name,Employee_Master.Email_ID,Employee_Master.Salary,Employee_Master.Photo,Department_Master.Department,Designation_Master.Designation,Employee_Master.Department_ID,Employee_Master.Designation_ID from Employee_Master Inner Join Department_Master on Employee_Master.Department_ID=Department_Master.DEpartment_ID Inner Join Designation_Master on Employee_Master.Desgination_ID=Designation_Master.Designation_ID";
bool whereadded=false;
if(ddldept.SelectedIndex>0)
{
cmd11 += "where Department_Master.Department_ID="+ ddldept.SelectedValue;
GridView1.EditIndex = -1;
whereadded = true;
}
if (ddldesg.SelectedIndex > 0)
{
if (whereadded == true)
{
GridView1.EditIndex = -1;
cmd11 += "and Designation_Master.Designation_ID=" + ddldesg.SelectedValue;
}
}
if (ViewState["sort"] != null)
{
cmd11 += "order by"+ ViewState["sort"];
GridView1.EditIndex = -1;
}
SqlDataAdapter da = new SqlDataAdapter(cmd11,con11);
DataTable dt = new DataTable();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
con11.Close();
}
protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
{
ViewState["sort"] = e.SortExpression;
bindGrid();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.EditIndex = -1;
GridView1.SelectedIndex = -1;
GridView1.PageIndex = e.NewPageIndex;
bindGrid();
}
protected void ddldept_SelectedIndexChanged(object sender, EventArgs e)
{
bindGrid();
}
protected void ddldesg_SelectedIndexChanged(object sender, EventArgs e)
{
bindGrid();
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
a=GridView1.DataKeys[e.NewEditIndex].Values[1].ToString();
b=GridView1.DataKeys[e.NewEditIndex].Values[2].ToString();
GridView1.EditIndex = e.NewEditIndex;
bindGrid();
SqlConnection con = new SqlConnection(Class1.Con_String);
con.Open();
SqlCommand cmd1 = new SqlCommand("Select Designation_ID,Designation from Designation_Master",con);
SqlDataReader dr1 = cmd1.ExecuteReader();
DropDownList ddl2=((DropDownList)GridView1.Rows[e.NewEditIndex].Cells[6].FindControl("ddl2"));
ddl2.DataSource = dr1;
ddl2.DataBind();
ddl2.SelectedValue = b;
con.Close();
SqlConnection conn = new SqlConnection(Class1.Con_String);
conn.Open();
SqlCommand cmd2 = new SqlCommand("Select Department_ID,Department from Department_Master",conn);
SqlDataReader dr2 = cmd2.ExecuteReader();
DropDownList ddl1=((DropDownList)GridView1.Rows[e.NewEditIndex].Cells[5].FindControl("ddl1"));
ddl1.DataBind();
ddl1.SelectedValue = a;
conn.Close();
}
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
bindGrid();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
decimal salary=(decimal)DataBinder.Eval(e.Row.DataItem,"Salary");
if ((salary > 50000) && (salary < 75000))
{
e.Row.ForeColor = Color.Red;
}
else
{
e.Row.ForeColor = Color.Green;
}
}
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
String id = GridView1.DataKeys[e.RowIndex].Value.ToString();
String name = ((TextBox)GridView1.Rows[e.RowIndex].Cells[1].FindControl("txtname")).Text;
String email=((TextBox)GridView1.Rows[e.RowIndex].Cells[2].FindControl("txtemail")).Text;
String salary=((TextBox)GridView1.Rows[e.RowIndex].Cells[3].FindControl("txtsalary")).Text;
FileUpload photo=((FileUpload)GridView1.Rows[e.RowIndex].Cells[4].FindControl("fuphoto"));
String desgname=((DropDownList)GridView1.Rows[e.RowIndex].Cells[6].FindControl("ddl2")).SelectedValue;
String departname=((DropDownList)GridView1.Rows[e.RowIndex].Cells[5].FindControl("ddl1")).SelectedValue;
SqlConnection con = new SqlConnection(Class1.Con_String);
con.Open();
if (photo.HasFile)
{
SqlCommand cmd = new SqlCommand("Update Employee_Master Set Employee_Master.Emp_Name=@name,Employee_Master.Email_ID=@email,Employee_Master.Salary=@salary,Employee_Master.Photo=@photo,Employee_Master.Department_ID=@departname,Employee_Master.Designation_ID=@desgname where Employee_Master.Emp_ID="+id,con);
cmd.Parameters.AddWithValue("@name",name);
cmd.Parameters.AddWithValue("@email",email);
cmd.Parameters.AddWithValue("@salary",salary);
cmd.Parameters.AddWithValue("@ photo",photo);
cmd.Parameters.AddWithValue("@desgname",desgname);
cmd.Parameters.AddWithValue("@departname",departname);
}
SqlCommand cmd1 = new SqlCommand("Update Employee_Master Set Employee_Master.Emp_Name=@name,Employee_Master.Email_ID=@email,Employee_Master.Salary=@salary,Employee_Master.Department_ID=@departname,Employee_Master.Designation_ID=@desgname where Employee_Master.Emp_ID="+ id,con);
cmd1.Parameters.AddWithValue("@name",name);
cmd1.Parameters.AddWithValue("@email",email);
cmd1.Parameters.AddWithValue("@salary",salary);
cmd1.Parameters.AddWithValue("@desgname",desgname);
cmd1.Parameters.AddWithValue("@departname",departname);
cmd1.ExecuteNonQuery();
GridView1.EditIndex = -1;
con.Close();
bindGrid();
}
===========================================================================================================
Default2.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
String id=Request.QueryString["Emp_ID"];
if (id == null)
{
Response.Redirect("Default.aspx");
return;
}
SqlConnection con = new SqlConnection(Class1.Con_String);
con.Open();
SqlCommand cmd = new SqlCommand("Select Employee_Master.Emp_ID,Employee_Master.Emp_Name,Employee_Master.Email_ID,Employee_Master.Salary,Employee_Master.Photo,Employee_Master.Department_ID,Employee_master.Designation_ID, Department_Master.Department_ID,Designation_Master.Designation_ID from Employee_Master Inner Join Department_Master on Employee_Master.Department_ID=Designation_Master.Desgination_ID",con);
SqlDataReader dr = cmd.ExecuteReader();
DetailsView1.DataSource = dr;
DetailsView1.DataBind();
con.Close();
}
}
|
|
|
|
|
Those select-statements do not return the same amount of columns; how would you show them in a grid?
If they *do* have the same amount of columns, than you could use a UNION statement to combine the resultsets.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Member 11161625 wrote:
if(ddldept.SelectedIndex>0)
{
cmd11 += "where Department_Master.Department_ID="+ ddldept.SelectedValue;
GridView1.EditIndex = -1;
whereadded = true;
}
if (ddldesg.SelectedIndex > 0)
{
if (whereadded == true)
{
GridView1.EditIndex = -1;
cmd11 += "and Designation_Master.Designation_ID=" + ddldesg.SelectedValue;
}
}
if (ViewState["sort"] != null)
{
cmd11 += "order by"+ ViewState["sort"];
GridView1.EditIndex = -1;
}
This code is susceptible to SQL Injection[^]. You need to use a parameterized query, as you did in your GridView1_RowUpdating method.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Please try following:
1. Mention the Text field and Value field for drop down list
SqlConnection con = new SqlConnection(Class1.Con_String);
con.Open();
SqlCommand cmd = new SqlCommand("Select Department_ID,Department from Department_Master", con);
SqlDataReader dr = cmd.ExecuteReader();
ddldept.DataSource = dr;
ddldept.DataTextField = "Department"
ddldept.DataValueField = "Department_ID";
ddldept.DataBind();
con.Close();
bindGrid();
2. You are missing specifying the datasource for Designation Master DDL. Please try following:
SqlConnection con1 = new SqlConnection(Class1.Con_String);
con1.Open();
SqlCommand cmd1 = new SqlCommand("Select Designation_ID,Designation from Designation_Master", con1);
SqlDataReader dr1 = cmd1.ExecuteReader();
ddldesg.Datasource = dr1;
ddldesg.DataTextField = "Designation"
ddldesg.DataValueField = "Designation_ID";
ddldesg.DataBind();
con1.Close();
|
|
|
|
|
Need help guys...
Can any body give me some code which can just help me capturing images from an ip-cam sing VB.NET?
|
|
|
|
|
|
Hi All,
I have came across a requirement, where converting a traditional excel application (with 7-8 diff sheets and each sheet with 50k cells and lots of macros / tables in it) into a web application.
Can any one suggest me which is the best way of doing this in .net, where I have to resemble the application just like the excel sheet. Here the challenging part is importing all the data, formulea and the macros into the web application, and have the luxury of SQL server as well for data. The JSON data of each sheet along with formulas and values is coming around 4mb.
Your suggestion are valuable and very much appreciated.
Thanks,
Sujana
|
|
|
|
|
What? You have to recreate Excel? That will take an inordinate amount of time. Perhaps use google docs or microsoft online.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Yes its almost like recreating the application. But looking for option where we can embed the excel into the application and import the data.
|
|
|
|
|
|