|
Which table item are you referring to ? I can't see any text in your table item.
|
|
|
|
|
I attempted to add an image, but I do not believe I was able to do that. The text gets put into the div via the code-behind, and could be anything, since it is data that comes from a database.
At any rate, I believe we have solved this issue, or come very close to solving it. For one, I believe we put in a break " ", which appears to have helped. Also, I think a good bit of the supporting JavaScript had to be modified.
Thanks all for your assistance. Have a great weekend!!
|
|
|
|
|
|
Hello,
I am looking for the suggestion to create a datagrid in ASP.NET with column value as CHECKBOX and Radio button as shown below.
Please suggest me how to implement it.
|
|
|
|
|
You have not shown anything.
Secondly, what prevents you from implementing it? Also, please set the data binding to the current data source, and DataGrid will automatically map the types of the columns to possible types. RadioButton, or CheckBox are two different types and have a different purpose. Show your data, sample input means and the table you have.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
You can do it with adding these controls to asp:TemplateField where do you stuck on this?
modified 20-Sep-20 21:01pm.
|
|
|
|
|
Hey Guys,
I have run into a small problem, we have sent a bulk email containing a link to a pdf file, a week after the bulk mail the pdf file had to be updated. My problem now is some of the recipients still viewing the cache version of the pdf, is there a way to force the browser to view the updated pdf file?
|
|
|
|
|
Probably like an image file, in which you attach a query string with the date after the file name.
name.pdf?ts=2017042601
If it ain't broke don't fix it
|
|
|
|
|
The problem is that the emails have already been sent so won't be able to add a query string.
|
|
|
|
|
Have the users clear their cache.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Maybe the web server is caching the pdf
If it ain't broke don't fix it
|
|
|
|
|
Hi,
Am using VS2008 Asp.net C#. I used Report.rdlc. I want to set A4size but 'SetPageSettings' function not enabled. It show error 'Does not contain a definition for SetPageSettings'
Below code i used
GlobalCS.sTraineeQry = sTrainQry1 + sTrainQry2 + sTrainQry3 + sTrainQry4 + sTrainQry5 + sTrainQry6 + sTrainQry7 + sTrainQry8 + sTrainQry9;
//set Processing Mode of Report as Local
ReportViewer1.ProcessingMode = ProcessingMode.Local;
//set path of the Local report
ReportViewer1.LocalReport.ReportPath = Server.MapPath("~/Session_RDLC.rdlc");
dsSession dsSes = GetData(GlobalCS.sTraineeQry);//new dsSession();
//ReportDataSource reportDataSource = new ReportDataSource();
//reportDataSource.Name = "dsSession_DataTable1";
//reportDataSource.Value = dsSes.Tables[0];
ReportDataSource reportDataSource = new ReportDataSource("dsSession_DataTable1", dsSes.Tables[0]);
//ReportViewer1.LocalReport.DataSources.Clear();
System.Drawing.Printing.PageSettings ps = new System.Drawing.Printing.PageSettings();
ps.Landscape = true;
ps.PaperSize = new System.Drawing.Printing.PaperSize("A4", 827, 1170);
ps.PaperSize.RawKind = (int)System.Drawing.Printing.PaperKind.A4;
ReportViewer1.SetPageSettings(ps);
|
|
|
|
|
HI,
I am getting the following Errors,while inserting drop down list values in sql server database
ERROR:
Server Error in '/Online_Book_Shopping' Application.
Procedure or function 'spRegisteruser' expects parameter '@countryname', which was not supplied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Procedure or function 'spRegisteruser' expects parameter '@countryname', which was not supplied.
Source Error:
Line 60: cmd.Parameters.Add(password);
Line 61: con.Open();
Line 62: int i= cmd.ExecuteNonQuery();
Line 63: con.Close();
Line 64: }
Source File: e:\Vijaya\Online_Book_Shopping\SignUp.aspx.cs Line: 62
How to solve this???Please Help???
This is my code:
aspx.cs:-
protected void btnn_Click(object sender, EventArgs e)
{
string constr = ConfigurationManager.ConnectionStrings["CS"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
SqlCommand cmd = new SqlCommand("spRegisteruser", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlParameter name = new SqlParameter("@name", txtusername.Text);
SqlParameter mobile = new SqlParameter("@mobile", txtmobilenumber.Text);
SqlParameter password = new SqlParameter("@password", txtpassword.Text);
SqlParameter dropdown = new SqlParameter("@country",DropDownList1.SelectedItem.Value);
cmd.Parameters.Add(name);
cmd.Parameters.Add(dropdown);
cmd.Parameters.Add(mobile);
cmd.Parameters.Add(password);
con.Open();
int i= cmd.ExecuteNonQuery();
con.Close();
}
Sql table:-
Create Table dbo.RegisteredUsers
(
ID int identity Primary Key,
Name nvarchar(20),
Country_Name nvarchar(30),
Mobile_No bigint,
[Password] nvarchar(20)
)
Go
This is storedprocedure:-
Alter Proc spRegisteruser
@Name nvarchar(20),
@countryname nvarchar(30),
@mobile bigint,
@password nvarchar(20)
As
Begin
Insert dbo.RegisteredUsers Values(@Name,@countryname,@mobile,@password)
End
Web.config:-
<connectionstrings>
<add name="CS" connectionstring="Server=.;Initial Catalog=Sample;Integrated Security=True;">
|
|
|
|
|
The error:
Procedure or function 'spRegisteruser' expects parameter '@countryname', which was not supplied. Your code:
SqlParameter dropdown = new SqlParameter("@country",DropDownList1.SelectedItem.Value);
Did you see it now?
You have set a parameter named @country instead of @countryname .
|
|
|
|
|
Incredible when the error message tells you exactly what the problem is.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
It looks like you have misnamed a parameter. I guess that
Member 11161625 wrote: SqlParameter dropdown = new SqlParameter("@country",DropDownList1.SelectedItem.Value);
should be
Member 11161625 wrote: SqlParameter dropdown = new SqlParameter("@countryname",DropDownList1.SelectedItem.Value);
so that the parameter name in the Parameters collection matches the parameter name in the Stored Procedure.
|
|
|
|
|
My form is working properly but the only problem is the i want to make that the gridview should also visible when i select only one dropdown. The below dropdown is just a one sample of my code.
I have a 4 dropdownlist which are connected with gridview. It is like a if i trigger 1st dropdown i have to select 2,3,4 then only the grid will show related data. I want that if i select only 1 or 1&2 or 1&2&3 then also it should show related data
protected void ddlFormat_SelectedIndexChanged(object sender, EventArgs e)
if (ddlFormat.SelectedIndex != 0)
{
SqlCommand cmd = new SqlCommand();
SqlDataAdapter da = new SqlDataAdapter();
DataSet dsDisp = new DataSet();
string lformat = "";
String strConnString = ConfigurationManager.ConnectionStrings["CallcenterConnectionString"].ConnectionString;
if (ddlFormat.SelectedValue.ToString().Trim().ToUpper().Contains("LOYALTY"))
{
lformat = "LOYALTY";
}
else
{
lformat = ddlFormat.SelectedValue.ToString();
}
using (var con = new SqlConnection(strConnString))
{
con.Open();
using (cmd = new SqlCommand("UserManagement", con))
{
cmd.Parameters.Add("@flag", SqlDbType.VarChar).Value = "2";
cmd.Parameters.Add("@CallType", SqlDbType.VarChar).Value = ddlCalltype.SelectedValue.ToString();
cmd.Parameters.Add("@Format", SqlDbType.VarChar).Value = ddlFormat.SelectedItem.Text;
cmd.Parameters.Add("@disposition", SqlDbType.VarChar).Value = ddlDisp.SelectedValue.ToString();
cmd.Parameters.Add("@SubDisposition", SqlDbType.VarChar).Value = ddlSubdisp.SelectedValue.ToString();
cmd.CommandType = CommandType.StoredProcedure;
cmd.ExecuteNonQuery();
da.SelectCommand = cmd;
da.Fill(dsDisp);
}
con.Close();
}
ddlDisp.DataTextField = "Disposition";
ddlDisp.DataValueField = "Disposition";
ddlDisp.DataSource = dsDisp.Tables[0];
ddlDisp.DataBind();
ddlDisp.Items.Insert(0, "<----Select---->");
ddlDisp.Focus();
}
}
protected void ddlFormat_SelectedIndexChanged(object sender, EventArgs e)
{ if (ddlFormat.SelectedIndex != 0)
{
SqlCommand cmd = new SqlCommand();
SqlDataAdapter da = new SqlDataAdapter();
DataSet dsDisp = new DataSet();
string lformat = "";
String strConnString = ConfigurationManager.ConnectionStrings["CallcenterConnectionString"].ConnectionString;
if(ddlFormat.SelectedValue.ToString().Trim().ToUpper().Contains("LOYALTY"))
{
lformat = "LOYALTY";
}
else
{
lformat = ddlFormat.SelectedValue.ToString();
}
using (var con = new SqlConnection(strConnString))
{
con.Open();
using (cmd = new SqlCommand("UserManagement", con))
{
cmd.Parameters.Add("@flag", SqlDbType.VarChar).Value = "2";
cmd.Parameters.Add("@CallType", SqlDbType.VarChar).Value = ddlCalltype.SelectedValue.ToString();
cmd.Parameters.Add("@Format", SqlDbType.VarChar).Value = ddlFormat.SelectedItem.Text;
cmd.Parameters.Add("@disposition", SqlDbType.VarChar).Value = ddlDisp.SelectedValue.ToString();
cmd.Parameters.Add("@SubDisposition", SqlDbType.VarChar).Value = ddlSubdisp.SelectedValue.ToString();
cmd.CommandType = CommandType.StoredProcedure;
cmd.ExecuteNonQuery();
da.SelectCommand = cmd;
da.Fill(dsDisp);
}
con.Close();
}
ddlDisp.DataTextField = "Disposition";
ddlDisp.DataValueField = "Disposition";
ddlDisp.DataSource = dsDisp.Tables[0];
ddlDisp.DataBind();
ddlDisp.Items.Insert(0, "<----Select---->");
ddlDisp.Focus();
}
} protected void ddlDisp_SelectedIndexChanged(object sender, EventArgs e)
{ try { if (ddlDisp.SelectedIndex != 0)
{
SqlCommand cmd = new SqlCommand();
SqlDataAdapter da = new SqlDataAdapter();
DataSet dsSubDisp = new DataSet();
String strConnString = ConfigurationManager.ConnectionStrings["CallcenterConnectionString"].ConnectionString;
using (var con = new SqlConnection(strConnString))
{
con.Open();
using (cmd = new SqlCommand("UserManagement", con))
{
cmd.Parameters.Add("@flag", SqlDbType.VarChar).Value = "3";
cmd.Parameters.Add("@CallType", SqlDbType.VarChar).Value = ddlCalltype.SelectedValue.ToString();
cmd.Parameters.Add("@Format", SqlDbType.VarChar).Value = ddlFormat.SelectedItem.Text;
cmd.Parameters.Add("@disposition", SqlDbType.VarChar).Value = ddlDisp.SelectedValue.ToString();
cmd.Parameters.Add("@SubDisposition", SqlDbType.VarChar).Value = "";
cmd.CommandType = CommandType.StoredProcedure;
cmd.ExecuteNonQuery();
da.SelectCommand = cmd;
da.Fill(dsSubDisp);
}
con.Close();
}
{
ddlSubdisp.DataTextField = "SubDisposition";
ddlSubdisp.DataValueField = "SubDisposition";
ddlSubdisp.DataSource = dsSubDisp.Tables[0];
ddlSubdisp.DataBind();
ddlSubdisp.Items.Insert(0, "<----Select---->");
ddlSubdisp.SelectedIndex = 0;
ddlSubdisp.Focus();
}
}
}
catch (Exception ex)
{ }
} protected void Button2_Click1(object sender, EventArgs e) {
SqlCommand cmd = new SqlCommand();
SqlDataAdapter da = new SqlDataAdapter();
DataTable dt = new DataTable();
String strConnString = ConfigurationManager.ConnectionStrings["CallcenterConnectionString"].ConnectionString;
using (var con = new SqlConnection(strConnString))
{
con.Open();
using (cmd = new SqlCommand("UserManagement", con))
{
cmd.Parameters.Add("@flag", SqlDbType.VarChar).Value = "0";
cmd.Parameters.Add("@CallType", SqlDbType.VarChar).Value = ddlCalltype.SelectedValue.ToString();
cmd.Parameters.Add("@Format", SqlDbType.VarChar).Value = ddlFormat.SelectedItem.Text;
cmd.Parameters.Add("@disposition", SqlDbType.VarChar).Value = ddlDisp.SelectedValue.ToString();
cmd.Parameters.Add("@SubDisposition", SqlDbType.VarChar).Value = ddlSubdisp.SelectedValue.ToString();
cmd.CommandType = CommandType.StoredProcedure;
cmd.ExecuteNonQuery();
da.SelectCommand = cmd;
da.Fill(dt);
}
con.Close();
}
gvDetails.DataSource = dt;
gvDetails.DataBind();
gvDetails.Visible = true;
}
Store procedure
ALTER PROCEDURE [dbo].[UserManagement]
@flag varchar(10),
@CallType varchar(50),
@Format varchar(50),
@disposition varchar(50),
@SubDisposition varchar(50)
AS
begin
if @flag = '0'
begin
Select DISTINCT Disp_id,CallType, Format, Disposition, SUbDisposition from CallCenter..Loy_DispMstr
where isactive='1' and CallType=@CallType and Format=@Format and Disposition = @disposition and SubDisposition =@SubDisposition
end
if @flag = '1'
begin
Select Formatid,Formatdetail,dispformat From loy_Formatdetail with (nolock)
Where isactive='1' and memberstatus = 'Member' order by FormatDetail
end
if @flag = '2'
begin
Select DISTINCT Disposition from CallCenter..Loy_DispMstr
where isactive='1' and CallType=@CallType and SUBFormat=@Format
end
if @flag = '3'
begin
Select distinct CallType,Format,Disposition,SubDisposition from Loy_DispMstr
where isactive='1' and CallType=@CallType and SUBFormat=@Format and Disposition = @disposition
end
if @flag = '4'
begin
select PID,Memberstatus,calltype,format,disposition,subdisposition, man_data,
creation_date,createdby,updation_date,updatedby from Loy_SubPlaceholder
end
end
|
|
|
|
|
Do not repost questions. You have the same question raised exactly below this.
modified 20-Sep-20 21:01pm.
|
|
|
|
|
I have a 4 dropdownlist which are connected with gridview. It is like a if i trigger 1st dropdown i have to select 2,3,4 then only the grid will show related data. I want that if i select only 1 or 1&2 or 1&2&3 then also it should show related data.
ALTER PROCEDURE [dbo].[UserManagement]
@flag varchar(10),
@CallType varchar(50),
@Format varchar(50),
@disposition varchar(50),
@SubDisposition varchar(50)
AS
begin
if @flag = '0'
begin
Select DISTINCT Disp_id,CallType, Format, Disposition, SUbDisposition from CallCenter..Loy_DispMstr
where isactive='1' and CallType=@CallType and SUBFormat=@Format and Disposition = @disposition and SubDisposition =@SubDisposition
end
if @flag = '1'
begin
Select Formatid,Formatdetail,dispformat From loy_Formatdetail with (nolock)
Where isactive='1' and memberstatus = 'Member' order by FormatDetail
end
if @flag = '2'
begin
Select DISTINCT Disposition from CallCenter..Loy_DispMstr
where isactive='1' and CallType=@CallType and SUBFormat=@Format
end
if @flag = '3'
begin
Select distinct CallType,Format,Disposition,SubDisposition from Loy_DispMstr
where isactive='1' and CallType=@CallType and SUBFormat=@Format and Disposition = @disposition
end
if @flag = '4'
begin
select PID,Memberstatus,calltype,format,disposition,subdisposition, man_data,
creation_date,createdby,updation_date,updatedby from Loy_SubPlaceholder
end
end
|
|
|
|
|
You have not given enough details of your problem.
But if I get it correctly you want to remove cascading dropdown behavior to display data in grid view, if yes then you can implement the drop down change event to display the data for each of them.
Whenever you have SelectedIndexChange event fired you can check the currently selected dropdown controls and prepare the data to bind to your grid control.
modified 20-Sep-20 21:01pm.
|
|
|
|
|
yes you are right...actually i dnt want to remove anything but its that i want to add on more feature which is that....on every dropdown selection it should show the data in gridview
|
|
|
|
|
So you may add a method to bind the data to grid view and make it visible.
Call this method on each SelectedIndexChange event and apply whatever business logic you have on selection change of current dropdown control and bind necessary data to your grid.
modified 20-Sep-20 21:01pm.
|
|
|
|
|
Hi I am using IE11, when my page runs it throws the error like below..please suggest..It runs fine in other broswers..
IE 11 giving XML5619: Incorrect document syntax
|
|
|
|
|
Set the content-type of you're request to text/xml and try.
modified 20-Sep-20 21:01pm.
|
|
|
|
|
Hi Friends,
I need your help.
Recently i got assignment to work on MVC based project.
Now i am well familiar with Traditional ASP.NET Web Forms & how it works..but not that much with MVC. So i need your general/overall guidance.
Consider a situation that i need to build internet based site wherein
a- Customer fills-in Registration page
b- Later when Admin logs-in the site, Admin can see List of Pending requests in the grid.
consider having columns like FirstName, LastName, Address, City, State in the Grid. First column in grid will have Image-with-Hyperlink
c If admin clicks on any record, again Registration page will open, admin can see details filled-in by user. Here admin can perform any of below 3 activities.
c1- Admin can modify any of these details & add few notes/comments, via Submit-Button.
c2- Admin can Approve request, via Submit-Button.
c3- Admin can Reject request, via Submit-Button.
After performing any of 3 above action, screen will go back to Pending-Request-Grid.
Approved/Rejected User will Not be shown in this grid.
d- Now Approved User will get shown into another grid call Manager Users.
Manage-User-Grid will have same info as Pending-Request-Grid, but here Image-Hyperlink will allow admin to disable a user Or will allow Edit user info.
Now considering above situation, i tried started developing MVC 5 based Web Application Project but i see that lot of features are coming into picture e.g. Partial-View, ViewModel, Entity Framework, Linq.
So it happens that, to complete Task-A, i implement one feature e.g. LINQ and after sometime, to complete Task-B, i got another article which show using Entity Framework. So again i need to create Few Classes, Delete Few Classes, Delete some code...
This kind of thigns takes more time & lot of times...working things get stopped.
I want to use below features in this project:
Entity Framekwork, Partial View, Strogly Typed View, Stored Procedure base Data Read/Modify
So what i want from you:
Q-1- Can you please tell me, which task to do 1st, so i can implement above fetures ?
Q-2 Also there are pages which has 2 List boxes. Means 2 Tables data need to be retrieved & displayed. So what is good method to display Multiple Tables data in the view, in current situation.
Note: This is small internet based site, but not having too much traffic. Also there is no Mobile-App reading this data.
So can you guys please help me...!!!
Any thoughts/article/video/link are welcome...!!!
Thanks
Devsql
|
|
|
|
|