|
Hi guys,
i have a data base table which has comments, users, and rating, i have to bind that rating information in the form stars according to individual user, like 1st user rated 1 so 1 star, 2nd user rated 3 so 3 star, what is the best way to achieve this.
|
|
|
|
|
|
I was asked for average rating like 3 people rated the item average may come like 1.2, 3.5 that rating i have to bind from code/jquery or any technology.
I also googled and got the links which you have given anyhow thanks for the reply.
If you come to know the average binding of rating control please reply back
Thanks
Vishwa
|
|
|
|
|
its very simple bro
enter this rating in to datbase
people have enter 2,3,4
then find average of that one select avg((2+3+4)/3)
|
|
|
|
|
calculation part is done bind that "Double" value to the control is not so simple as you saying, i tried to bind 3.5 it covering 4 *'s in the control.
|
|
|
|
|
|
Hey,
I am new with visual studio and having a problem that entries in database are not updated on crystal report plz let me knew the procedure to get connection of database with crystal report.
Regards,
Durgesh Jadhav
|
|
|
|
|
|
please let me knew how to generate crystal report for visual studio 2008
Regards,
durgesh
|
|
|
|
|
|
Plz send me the any online quiz module with code
Regards,
Durgesh
|
|
|
|
|
|
No. But we would be happy to help if you get stuck on a particular issue.
There is no one way to do it so for anyone of us to send you all of the code there are several issues.
1. How will you be paying for it?
2. We would have had to written the code previously which very few likely have done.
3. We could write the code now but it will take a while.
4. We could send you code but then it may not work in your environment because of other issues you have not explained.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
|
I read several posts online & verified the following: 1. AutoPostBack="true" 2. EnableViewState="True" (default) 3. CausesValidation = "False" (default) Also added the EnableViewState="true" on the page-level directive. Inspite of this I am unable to cause the SelectedIndexChanged event to trigger. I am using VS2010, VB.NET with no AJAX. I am populating my dropdownlist in the PageLoad event and on the condition If (Not IsPostback) Another issue is that my dropdownlist items are getting cleared on postback each time. So as a work around I added SQLDataSource on my aspx page and configured it as datasource to my dropdownlist and now the event is getting triggered properly, I am not sure why.
I am new to VB.NET and web development and I feel I am missing something obvious, like taking into consideration Page events chronology, please suggest. Thanks for all your help in advance.
<%@ Page Title="" Language="VB" MasterPageFile="~/MyMaster.master" AutoEventWireup="false" CodeFile="MyPage.aspx.vb" Inherits="MyPage" EnableViewState="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainPageContent" Runat="Server">
<center><h3>Title</h3></center><br />
<table width="500px">
<tr>
<td><asp:Label ID="Label1" Text="Label1 : " runat="server"></asp:Label></td>
<td><asp:DropDownList ID="ddl1" Width="200px" runat="server"
AutoPostBack="True"/></td>
</tr>
<tr><td></td></tr>
<tr>
<td><asp:Label ID="Label2" Text="Label2 : " runat="server"></asp:Label></td>
<td><asp:DropDownList ID="ddl2" Width="200px" runat="server"
AutoPostBack="True" /></td>
</tr>
<tr><td></td></tr>
<tr>
<td><asp:Label ID="Label3" Text="Label3 : " runat="server"></asp:Label></td>
<td><asp:DropDownList ID="ddl3" Width="200px" runat="server"
AutoPostBack="True" /></td>
</tr>
</table><br />
<asp:Label ID="lblError" ForeColor="Red" runat="server" />
</asp:Content>
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration.ConfigurationManager
Partial Class MyPage Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If IsPostBack Then
Exit Sub
End If
PopulateData()
End Sub
Private Sub PopulateData()
Dim da As New SqlDataAdapter
Dim ds1, ds2, ds3 As New DataSet
Try
Using conn As New SqlConnection(ConnectionStrings.Item("DataConnectionString").ToString)
Using cmd As New SqlCommand("MySP1", conn)
cmd.CommandType = CommandType.StoredProcedure
conn.Open()
da.SelectCommand = cmd
da.Fill(ds1)
cmd.CommandText = "MySP2"
da.SelectCommand = cmd
da.Fill(ds2)
cmd.CommandText = "MySP3"
da.SelectCommand = cmd
da.Fill(ds3)
conn.Close()
End Using
End Using
ddl1.DataSource = ds1.Tables(0)
ddl1.DataValueField = "Col1"
ddl1.DataTextField = "Col2"
ddl1.DataBind()
ddl1.Items.Insert(0, New ListItem(String.Empty, String.Empty))
ddl1.SelectedIndex = 0
ddl2.DataSource = ds2.Tables(0)
ddl2.DataValueField = "Col1"
ddl2.DataTextField = "Col2"
ddl2.DataBind()
ddl2.Items.Insert(0, New ListItem(String.Empty, String.Empty))
ddl2.SelectedIndex = 0
ddl3.DataSource = ds3.Tables(0)
ddl3.DataValueField = "Col1"
ddl3.DataTextField = "Col2"
ddl3.DataBind()
ddl3.Items.Insert(0, New ListItem(String.Empty, String.Empty))
ddl3.SelectedIndex = 0
Catch ex As Exception
'todo get a proper error message here
lblError.Text = "Error"
End Try
End Sub
Protected Sub ddl_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles ddl1.SelectedIndexChanged, ddl2.SelectedIndexChanged, ddl3.SelectedIndexChanged
ClientScript.RegisterStartupScript(Me.GetType(), "myalert", "alert('" & "test" & "');", True)
End Sub
End Class
|
|
|
|
|
You need to bind event "ddl_SelectedIndexChanged" with dropdown list.
<asp:DropDownList ID="ddl3" runat="server" OnSelectedIndexChanged="ddl_SelectedIndexChanged" AutoPostBack="True" />
Parwej Ahamad
|
|
|
|
|
Thanks for the help. But in VB.NET the event handling happens in the code-behind using "Function Handles control.event" kind of signature.
You can find that in the code I have posted in my original question.
|
|
|
|
|
Can anybody suggest how to send some List of objects from an Asp.Net app to another one.
My Reading-o-Meter
Previous -> Read "CLR via C#" by Jeffrey Richter.
Current -> Exploring WCF thru Apress' "Pro WCF" by Chris Peiris and Dennis Mulder.
Next -> Need to read "The Art of Computer Programming" by Donald E. Knuth.
My blog - My recent article
|
|
|
|
|
Post data through the Service in other application.
Parwej Ahamad
|
|
|
|
|
You can use WebClient class or WebRequest to post data to another site. There are lots of samples online.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Dear Friends,
I am recent very high honor college graduates with A.S. Degree in Computer Programming, and I really want to be a good .NET developer.
Most of requirements for Entry Level/Junior Level .NET Developer Position in my living areas demand at least more two years of working experience in .NET environment.
As you know that fresh college graduates have no or little working experience on specific field/area except someone who was working on that field/area before he/she joins a college.
The question that I would like to ask this forum is what is ASP.NET Web forms stuff equivalent two or more working experience I should know IN SHORT PATH (I am just having 4 and 1/2 months old baby that I need to feed him; Therefore, I must to get the job in next two months!!!), and how I can have them?
Thank you for your understanding and kindly helps. Now, if you or someone you know could hire a guy like me, it would be greatly appreciated. - Thanks again.
|
|
|
|
|
I think this kind of General question you should ask in some relevant forum like The Lounge.
But anyhow this is my suggestions to your query:
First thing I will suggest (as you are a fresh graduate) you is build your basic foundation to a great extent by reading some books on .Net and upgrade yourself on other relevant skills, read, practice and understand the concepts daily as much as you can. And parellely try for some jobs by posting your profile in Job portals like Naukri.com. I think that there should be some opportunities for entry level guys also in the market. Be in touch with your friends and relatives who are already working in Software industry for any job reference. If possible join some good institute for learning relevant technologies.
According to my understanding, you have to have good skillset in these: .Net framework, OOP, C#, ASP.Net (if you are interested in Web apps), Win forms/wpf (if you are interested in Desktop apps), Web services/wcf.
Send your CV to hameed dot in at hotmail dot com. I will forward to my HR, they may contact you if any entry level opportunity in our organization.
My Reading-o-Meter
Previous -> Read "CLR via C#" by Jeffrey Richter.
Current -> Exploring WCF thru Apress' "Pro WCF" by Chris Peiris and Dennis Mulder.
Next -> Need to read "The Art of Computer Programming" by Donald E. Knuth.
My blog - My recent article
|
|
|
|
|
protected void Text2PDF()
{
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
//frm.Controls.Add(appmessage);
//frm.Controls.Add(GVPostApplied);
//frm.RenderControl(hw);
//message.RenderControl(hw);
HtmlForm frm = new HtmlForm();
//appmessage.Parent.Controls.Add(GVPostApplied);
frm.Controls.Add(txtestablishname);
frm.Controls.Add(Txtyear);
frm.Controls.Add(TxtownerS);
frm.Controls.Add(Txtlocation);
frm.Controls.Add(Txtdist);
frm.Controls.Add(Txtblock);
frm.Controls.Add(txtVill);
frm.Controls.Add(txtState);
frm.Controls.Add(txtPIN);
frm.Controls.Add(txtTelePN);
frm.Controls.Add(txtFax);
frm.Controls.Add(txtEmail);
frm.Controls.Add(txtMObile);
frm.Controls.Add(txtOwnerName);
frm.Controls.Add(txtIncharge);
frm.Controls.Add(txtDesig);
frm.Controls.Add(Txtqualitype);
frm.Controls.Add(txtQuali);
frm.Controls.Add(Txtdist2);
frm.Controls.Add(Txtblock2);
frm.Controls.Add(txtViilTown);
frm.Controls.Add(txtsatate2);
frm.Controls.Add(txtPin2);
frm.Controls.Add(Txtstd2);
frm.Controls.Add(txtfax2);
frm.Controls.Add(txtemail2);
frm.Controls.Add(txtMobile2);
frm.Controls.Add(ListBoxmedicineoffer);
frm.Controls.Add(ListBoxinpatient);
divpdf.Parent.Controls.Add(CheckBoxList1);
divpdf.Parent.Controls.Add(GridViewOPD);
divpdf.Parent.Controls.Add(GridViewBed);
divpdf.Parent.Controls.Add(GVPostessen);
//frm.Controls.Add(CheckBoxList1);
frm.Controls.Add(Txtinpatientbed);
frm.Controls.Add(txtTotalarea);
frm.Controls.Add(TxtArea);
frm.Controls.Add(txtContructedArea);
frm.Controls.Add(txtbiolicence);
frm.Controls.Add(txtNoofstaff);
frm.Controls.Add(txtDDno);
frm.Controls.Add(txtDDdate);
frm.Controls.Add(txtDDamount);
frm.Controls.Add(txtDDbank);
frm.Controls.Add(Txtpayment_type);
frm.Attributes["runat"] = "server";
txtestablishname.RenderControl(hw);
Txtyear.RenderControl(hw);
TxtownerS.RenderControl(hw);
Txtlocation.RenderControl(hw);
Txtdist.RenderControl(hw);
Txtblock.RenderControl(hw);
txtVill.RenderControl(hw);
txtState.RenderControl(hw);
txtPIN.RenderControl(hw);
txtTelePN.RenderControl(hw);
txtFax.RenderControl(hw);
txtEmail.RenderControl(hw);
txtMObile.RenderControl(hw);
txtOwnerName.RenderControl(hw);
txtDesig.RenderControl(hw);
txtIncharge.RenderControl(hw);
Txtqualitype.RenderControl(hw);
txtQuali.RenderControl(hw);
Txtdist2.RenderControl(hw);
Txtblock2.RenderControl(hw);
txtViilTown.RenderControl(hw);
txtsatate2.RenderControl(hw);
txtPin2.RenderControl(hw);
Txtstd2.RenderControl(hw);
txtfax2.RenderControl(hw);
txtemail2.RenderControl(hw);
txtMobile2.RenderControl(hw);
ListBoxmedicineoffer.RenderControl(hw);
ListBoxinpatient.RenderControl(hw);
txtTotalarea.RenderControl(hw);
TxtArea.RenderControl(hw);
txtContructedArea.RenderControl(hw);
Txtinpatientbed.RenderControl(hw);
txtbiolicence.RenderControl(hw);
txtNoofstaff.RenderControl(hw);
txtDDno.RenderControl(hw);
txtDDdate.RenderControl(hw);
txtDDamount.RenderControl(hw);
txtDDbank.RenderControl(hw);
Txtpayment_type.RenderControl(hw);
divpdf.RenderControl(hw);
//string Imagepath1 = Server.MapPath("~") + "\\Images\\NRHMlogo.png";
//string Imagepath2 = Server.MapPath("~") + "\\Images\\cgLogo.gif";
StringBuilder html = new StringBuilder();
html.Append("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
html.Append("<head></head>");
html.Append("<body>");
html.Append("<form id=\"form1\" runat=\"server\">");
html.Append("");
html.Append(" ");
//html.Append("");
html.Append("");
html.Append(" | NATIONAL RURAL HEALTH MISSION, RAIPUR | |
");
//html.Append("Online Candidate Registration Acknowledgement,हनुमान जी का जन्म ");
html.Append(sw.GetStringBuilder().ToString());
html.Append("</form>");
html.Append("</body>");
html.Append("</html>");
HttpContext context = HttpContext.Current;
TextReader reader = new StringReader(html.ToString());
//Create PDF document
Document document = new Document(PageSize.A4);
HTMLWorker parser = new HTMLWorker(document);
string PDF_FileName = Server.MapPath("~") + "\\Upload\\DwnAck.pdf";
PdfWriter.GetInstance(document, new FileStream(PDF_FileName, FileMode.Create));
document.Open();
try
{
parser.Parse(reader);
}
catch (Exception ex)
{
//Display parser errors in PDF.
Paragraph paragraph = new Paragraph("Error!" + ex.Message);
Chunk text = paragraph.Chunks[0] as Chunk;
if (text != null)
{
text.Font.Color = BaseColor.RED;
}
document.Add(paragraph);
}
finally
{
document.Close();
DownLoadPdf(PDF_FileName);
}
}
vsagar
|
|
|
|
|
The error is pretty clear. You'll need to use a shorter path.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|