|
Hello sir ... thank u soo much
i followed ur way but its not working actual process this project is reg Hospital management system. in one .aspx i need to add patient name and details and that same page i search exit patient option is there if i click search button that another page will come in that exit patient details is there so if i selected that one patient . that patient details comes previous .aspx page here blow that page one gridview is there that patient details comes under that page
so in that grid header contains patient id, name , ph no .. below that header name and id comes. if i scroll that datagrid that patient details overflow to that grid header this is actual function , this is working in IE but in Mozilla that datagrid header also overflow .
.CSS file
.gridFixedHeader
{
background-color:white;
font-size: 9pt;
color: #FFFFFF;
position: relative;
font-family: Airal,sans-serif;
border:#0066CC;
max-width :100px;
top:expression(this.offsetParent.scrollTop-0);// this line shows top doesn't have this property)
z-index: 1;
}
.aspx datagrid code
plz help for this
Thank u
|
|
|
|
|
Hello sir ... thank u soo much
i followed ur way but its not working actual process this project is reg Hospital management system. in one .aspx i need to add patient name and details and that same page i search exit patient option is there if i click search button that another page will come in that exit patient details is there so if i selected that one patient . that patient details comes previous .aspx page here blow that page one gridview is there that patient details comes under that page
so in that grid header contains patient id, name , ph no .. below that header name and id comes. if i scroll that datagrid that patient details overflow to that grid header this is actual function , this is working in IE but in Mozilla that datagrid header also overflow .
.CSS file
.gridFixedHeader
{
background-color:white;
font-size: 9pt;
color: #FFFFFF;
position: relative;
font-family: Airal,sans-serif;
border:#0066CC;
max-width :100px;
top:expression(this.offsetParent.scrollTop-0);// this line shows top doesn't have this property)
z-index: 1;
}
.aspx datagrid code
|
|
|
|
|
Hello sir ... thank u soo much
i followed ur way but its not working actual process this project is reg Hospital management system. in one .aspx i need to add patient name and details and that same page i search exit patient option is there if i click search button that another page will come in that exit patient details is there so if i selected that one patient . that patient details comes previous .aspx page here blow that page one gridview is there that patient details comes under that page
so in that grid header contains patient id, name , ph no .. below that header name and id comes. if i scroll that datagrid that patient details overflow to that grid header this is actual function , this is working in IE but in Mozilla that datagrid header also overflow .
.CSS file
.gridFixedHeader
{
background-color:white;
font-size: 9pt;
color: #FFFFFF;
position: relative;
font-family: Airal,sans-serif;
border:#0066CC;
max-width :100px;
top:expression(this.offsetParent.scrollTop-0);// this line shows top doesn't have this property)
z-index: 1;
}
.aspx datagrid code
DIV id="div-datagrid" style="overflow :auto ;Width :100%;HEIGHT: 100%"
|
|
|
|
|
Hi, I would like to have 2 questions on data reader object answered. Suppose I want to iterate through the data reader results using a while loop like the following:
While objDataReader.Read()<br />
'do something<br />
str = objDataReader("Supplier_Name")<br />
End While<br />
If my query which precedes the above while loop is (Select Supplier_Name from Suppliers where ShippingFee < $50.0).
1)Will the results include all the names within the Supplier_Name column or will they be just the names of suppliers whose ShippingFee is less than $50.0?
2)Will I need to tell it to read the next result until the EOF?
Thank you in advance for your help.
|
|
|
|
|
ASPnoob wrote: 1)Will the results include all the names within the Supplier_Name column or will they be just the names of suppliers whose ShippingFee is less than $50.0?
they will be just the names of suppliers whose ShippingFee is less than $50.0.
ASPnoob wrote: 2)Will I need to tell it to read the next result until the EOF?
No.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
hi all
i want show product same page amazon so i dont know have control in .net 2.0, can do it ???
i am trying build to desgin table with codebehind
but have problem: it only show cell Price on function CreateTable
could u show to me ?????
on the page desgin i have control:
<asp:table id="tabaddform" runat="server" cellpadding="0" cellspacing="0">
and in codebehind into function Page_Load is function viewdata
TableCell tblCell;
TableRow tblRow;
Table tbltable;
Image imgView;
Label lblLable;
private void ViewData()
{
try
{
DataTable dt = LoadData();
string strName, strPrice, strImg;
//y Counter int y = 0;
for (int i = 0; i < dt.Rows.Count; i++)
{
strName = dt.Rows[i]["ProductName"].ToString();
strPrice = dt.Rows[i]["UnitPrice"].ToString();
strImg = dt.Rows[i]["linkimg"].ToString();
if (y == 0)
{
tblRow = new TableRow();
}
tblCell = new TableCell();
//createTable
tblCell.Controls.Add(createTable(strName, strPrice, strImg));
tblRow.Cells.Add(tblCell);
tabaddform.Rows.Add(tblRow);
y++;
if (y == 3)
{
y = 0;
}
}
}
catch (Exception ex)
{
throw ex;
}
}
And function
private Table createTable(string strName, string strPrice, string strImg)
{
try
{
tbltable = new Table();
//Add image
tblRow = new TableRow();
tblCell = new TableCell();
imgView = new Image();
imgView.ImageUrl = strImg;
imgView.ID = "img" + strName;
tblCell.Controls.Add(imgView);
tblRow.Cells.Add(tblCell);
tbltable.Rows.Add(tblRow);
//add Name
tblRow = new TableRow();
tblCell = new TableCell();
lblLable = new Label();
lblLable.ID = "lblName" + strName;
lblLable.Text = "Name: " + strName;
tblCell.Controls.Add(lblLable);
tblRow.Cells.Add(tblCell);
tbltable.Rows.Add(tblRow);
//add Price
tblRow = new TableRow();
tblCell = new TableCell();
lblLable = new Label();
lblLable.ID = "lblPrice" + strName;
lblLable.Text = "Price: " + strPrice +"$";
tblCell.Controls.Add(lblLable);
tblRow.Cells.Add(tblCell);
tbltable.Rows.Add(tblRow);
return tbltable;
}
catch (Exception ex)
{
throw ex;
}
}
|
|
|
|
|
Use The following code insted your:
DataTable dt = new DataTable();
System.Text.StringBuilder sw = new System.Text.StringBuilder();
sw.Append("");
for (int row = 0; row < dt.Rows.Count; row++)
{
sw.Append("");
for (int col = 0; col < dt.Columns.Count; col++)
{
sw.Append("");
}
sw.Append("");
}
sw.Append("" + dt.Rows[row][dt.Columns[col].ColumnName].ToString() + " | ");
HtmlTable tbl = new HtmlTable();
tbl.InnerHtml = sw.ToString();
panel1.Controls.Add(tbl);
Naresh Patel
|
|
|
|
|
thanks it good idea
But i dont want to use HtmlTable
could u tell me how can i assgin sw to desgin
ex:
<% sw.tostring()%>
|
|
|
|
|
A dropdownlist is calling a function. The function needs to capture the id (__EventTarget) of the control and the value (__EventArugment).
Below is the code that I have, it can successfully capture and display the id of the drdopdownlist but it does not
capture anything for the selected value (__EventArugment). I've seen similar code being used by others and it seems to be working fine for them
Any help would be greatly appreciated.
Aspx Page:
<code><%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server" OnSelectedIndexChanged="function" AutoPostBack="true">
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="2" Value="2"></asp:ListItem>
<asp:ListItem Text="3" Value="3"></asp:ListItem>
<asp:ListItem Text="4" Value="4"></asp:ListItem>
</asp:DropDownList>
</div>
</form>
</body>
</html>
</code>
Code Behind:
<pre>
<code>using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void function(object sender, EventArgs e)
{
Response.Write(Request.Form["__EVENTARGUMENT"] + Request.Form["__EVENTTARGET"]);
}
}
</code>
|
|
|
|
|
OnSelectedIndexChanged in the HTML part - you can bind a javascript function. In your code the function is written in the codebehind and binding the function is done in the HTML part.
there is a server-side event -- DropDownList_SelectedIndexChanged
why don't you put this part
(Response.Write(Request.Form["__EVENTARGUMENT"] + Request.Form["__EVENTTARGET"]);
in then server side DropDownList_SelectedIndexChanged(object sender, EventArgs e) event.
------------------------------------------
I don't think that server-side protected function accepts these two argument's
(object sender, EventArgs e)
Regards
John
|
|
|
|
|
how v can get value of chekbox (cheked or unchekd)in a javascript
im using a content page .In dat page i put a chekbox with id=ChKPromoActive;
i hav tried this code but it s returning null value
var chkPromo = document.getElementById("ChKPromoActive");
alert(chkPromo);
|
|
|
|
|
Hi,
You can use Html CheckBox for this purpose:
Hello
function Check()
{
var cc=document.getElementById("chk2");
alert(cc.checked);
}
Naresh Patel
|
|
|
|
|
Hi,
I would like to know how do I able to upload an image and display it again from the web server? Currently I am using "this.filePic.PostedFile.SaveAs(image);" but this one need a rooted file path, it works only for uploading and downloading but the file path stored in my database will give a problem when I need to display the picture.
Thanks in advance.
J Liang
|
|
|
|
|
HI,
Store just the ImageName of saved image. And use Server.MapPath("imagenamesavedfromdatabase") function
THis function return the ImagePath of your FileSystem Where the image stored in the server.
Naresh Patel
|
|
|
|
|
Hi,
Thanks for the suggestion, it works.
J Liang
|
|
|
|
|
Hi,
I was wondering if there is an ASP.net way of doing this.
I have a template of controls, <text field><drop down list><drop down list>
The number of this "template" depends on the user's search criteria. In ASP, I did it using a count variable and if the user adds (by pressing the 'add' button) and doing a while loop to add it.
i.e. if the use adds 3 (1 is default) 4 rows of the above controls will be displayed.
Thanks.
Desmond
|
|
|
|
|
You would want to do this with "asp .net repeater control", a simple but very powerful way of implementing what you're trying to do.
Enjoy.
|
|
|
|
|
Yup, that I understand but how do I actually "tell" it I want it to "repeat" 5 times?
|
|
|
|
|
Hi,
I can't understand what is wrong here, can somebody look it up please.
I get and exception: Cannot insert the value NULL into column 'NID', table 'C:\...'; column does not allow nulls. INSERT fails.
The statement has been terminated.
but during the debugging it shows that it gets the value.
Here is my code:
<asp:SqlDataSource ID="SubmitSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:NConnectionString %>"<br />
InsertCommand="INSERT INTO NTable(NID, Headline, Category, Tags, Username, Date, Rating, CountRating, Enabled) VALUES (@newsID, @headline, @category, @tags, @username, @date, NULL, 0, @enabled)"<br />
OnInserting="SubmitSqlDataSource_Inserting" ><br />
<InsertParameters><br />
<asp:Parameter Name="newsID" /><br />
<asp:Parameter Name="headline" /><br />
<asp:Parameter Name="category" /><br />
<asp:Parameter Name="tags" /><br />
<asp:Parameter Name="username" /><br />
<asp:Parameter Name="date" /><br />
<asp:Parameter Name="enabled" /><br />
</InsertParameters><br />
</asp:SqlDataSource>
Here is my C# code:
protected void SubmitSqlDataSource_Inserting(object sender, SqlDataSourceCommandEventArgs e)<br />
{<br />
newsID = System.Guid.NewGuid();<br />
TextBox HeadlineTextBox = (TextBox)SubmitFormView.FindControl("HeadlineTextBox");<br />
DropDownList CategoriesDDL = (DropDownList)SubmitFormView.FindControl("CategoriesDDL");<br />
TextBox TagsTextBox=(TextBox)SubmitFormView.FindControl("TagsTextBox");<br />
CheckBox EnabledCheckBox = (CheckBox)SubmitFormView.FindControl("EnabledCheckBox");<br />
SubmitSqlDataSource.InsertParameters["newsID"].DefaultValue = Convert.ToString(newsID);<br />
SubmitSqlDataSource.InsertParameters["headline"].DefaultValue = HeadlineTextBox.Text;<br />
SubmitSqlDataSource.InsertParameters["category"].DefaultValue = CategoriesDDL.SelectedValue;<br />
SubmitSqlDataSource.InsertParameters["tags"].DefaultValue = TagsTextBox.Text;<br />
SubmitSqlDataSource.InsertParameters["username"].DefaultValue = Membership.GetUser().UserName.ToString();<br />
SubmitSqlDataSource.InsertParameters["date"].DefaultValue=DateTime.Now.ToString();<br />
SubmitSqlDataSource.InsertParameters["enabled"].DefaultValue = EnabledCheckBox.Checked.ToString();<br />
}
Thx
|
|
|
|
|
I have the following requirement for an assignment. Could u please help me in creating xml document for this. I have images stored in c drive.
. Create an xml document that models the image groups. Each grouping should include the name and location of the images within the group.
• Create a web page that allows the user to select and display a group of images.
• Use the xml file to specify the groups of images the user can select.
• Allow the user to select a group of images.
• Display the group of images when a selection is made.
seema
|
|
|
|
|
It is so sad to say that we are not here for doing your assignment. If you are attending some courses, you should try to do your assignment or homework.
And ask if you have any problem while you are trying.. then, it's good for both sides especially you.
Thanks for understanding.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Dear Seema,
Please try to do your tasks. If you have any doubts then ask.
But without trying if you write your tasks like this is not good.
i think you got it.
Regards,
Niranjan
|
|
|
|
|
First, stop asking the same question over and over in multiple forums. Second, you need to at least TRY to do your own homework. If you get stuck in a bit of code then post it and we'll help. But if you are not willing to even start it yourself I suggest changing majors immediately.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
hi everyone,
does anyone out there knows any tutorial sites about svg mapping???
my Final Year Project(FYP) is due in october...and i haven't started yet.
i've searched the net , but all i can find are svg tutorials that are hardcoded.
does this mean that i have to hardcode every controls and interfaces..using notepad??
please help...URGENT!!
BTW, i planned on using VWD2005 and not notepad...
please anyone...?? blogs?? master of asp.net ??? svg guru ??
i don't even know if i'm in the right forum...
|
|
|
|
|
hello all,
I have master detail gridview master gridview company and detail gridview is peoplelist, i wanted to implement multiple selection in detail gridview using checkboxes. But i am not sure how to get the datakey (in mycase personid) of all the rows in which the checkbox is selected. I need to do insert operation using these personid's can anyone point me in the right direction.
Cheers, Shilpa.
I am trying to access the child gridview in this method but not able to do so
GridView People = grdCompanyPeople.FindControl("grdPersons")as GridView
for (int i = 0; i < People.Rows.Count; i++)
{
GridViewRow Singlerow = People.Rows[i];
bool isChecked = ((CheckBox)Singlerow.FindControl("chkSelect")).Checked;
if (isChecked == true)
{
str.Append(People.DataKeys[Singlerow.RowIndex]["PersonID"].ToString() + ",");
}
}
// prints out the result
Response.Write(str.ToString());
Thanks in Advance for your help. Best Regards
|
|
|
|