|
Hi barani,
Try this
string fextn = System.IO.Path.GetFullPath(File1.PostedFile.FileName);
Sutheesh Ramachandran
Cybernet Software Systems,
T Nagar, Chennai 17.
|
|
|
|
|
Whenever iam using Rating control This error is coming.
output is coming(but IMAGES not displaying)
|
|
|
|
|
Hi...
I want horizontal scroll bar in Listbox. For that i am using following code.
<div style="width:120px; overflow-x:auto">
<asp:listbox id="lstboxvalue" runat="server" width="125px" rows="6" xmlns:asp="#unknown"></asp:listbox>
</div>
It gives me horizontal scroll bar. But it truncates some portion of text. The whole text is stored in database but whole isn't reflected here. Can anyone tell me what could be the problem.
eg. The text stored in database is 'testing by needhi', den it shows only 'testing by ne'.
Plz help. Its urgent..
|
|
|
|
|
needhi_p wrote: eg. The text stored in database is 'testing by needhi', den it shows only 'testing by ne'.
Remove Width of ListBox and Div
Regard
kHan
please don't forget to vote on the post that helped you.
|
|
|
|
|
hi.. thnx it was such a silly mistake...
|
|
|
|
|
|
Thanks Sherin
its working .ya you are right .plz tell now how i can take the values from user controls .and how i can retrive the values at next page .
but the condition is same .if 2 is selected then only two user control should be appear and values of these user control go to the next page.
plz send me the code
Thanks .....Again
gaurav
|
|
|
|
|
I think you already have the properties for the control.
Then as i already told,
for Loop
{
//Create controls
}
Here the create control creates, controls in to array, say 'cntrlArray'.
Then when you want to retrieve the value of the controls created
for(int i=0;i<cntrlarray.length;i++)>
{
//Get Values <--- cntrlArray[i].YourProperty;
}
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Thanks Sherin
actually i am new in asp.net .i was doing job in testing.
plz tell me how to add dynamically generated usercontrols
in an array.you tell me this code
for (int curControl = 0; curControl < totalControl; curControl++)
{
WebUserControl uc =
(WebUserControl)Page.LoadControl("WebUserControl.ascx");
PlaceHolder1.Controls.Add(uc);
}
it is right
for(int i=0;i<cntrlarray.length;i++)>
{
//Get Values <--- cntrlArray[i].YourProperty;
}
i think it will also work
after that how pass the values of the property (i have three properties in usercontrol)values with in conditions(if select 2 then 6 values goes to next page and if 3 selected by user then 9 values should pass ) at next page.
plz suggest
thanks ......gaurav
|
|
|
|
|
before the for loop
MyCntrlArray MCA[totalControl];//Change the total control
gaurav mangal wrote: for (int curControl = 0; curControl < totalControl; curControl++)
{
WebUserControl uc =
(WebUserControl)Page.LoadControl("WebUserControl.ascx");
PlaceHolder1.Controls.Add(uc);
}
for (int curControl = 0; curControl < totalControl; curControl++)
{
MCA[i]=(WebUserControl)Page.LoadControl("WebUserControl.ascx");
PlaceHolder1.Controls.Add(MCA[i]);
}
gaurav mangal wrote: for(int i=0;i<cntrlarray.length;i++)>
{
//Get Values <--- cntrlArray[i].YourProperty;
}
for(int i=0;i<mca.length;i++)>
{
//Access the valuse(Properties here)
MCA[i].MyProperty;//Do what ever you want with the properties
}
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
Hi Sherin
Thanks for this great suggestion .
Gaurav
|
|
|
|
|
I am working on an application that generates reports using Crystal Reports 10... and I want to remove the tooltips that appears in the report.
any idea how to do that?
|
|
|
|
|
Please help...
|
|
|
|
|
I am using Visual Studio.NET 2003 and Crystal Reports 10.
any idea?
|
|
|
|
|
i am trainee asp web developer.i want to connect my web pagers to access database manually coding.how to code it.please help me.give me examples.
i want to host my site what is database plase. please understand my quection
modified on Thursday, July 10, 2008 4:24 AM
|
|
|
|
|
lankaudaranga wrote: lankaudaranga@gmail.com
Not a good idea to put your email address in the post. You open up to spammers harvesting the forums.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I think that you could do with buying a decent book. Consider going over to here http://www.asp.net [^]and going through some of the basic tutorials. You'll not get too many answers here for such vague questions.
|
|
|
|
|
Hi,
I develop a code for data manipulation i.e (first, next, previous and last record). i try the below mentioned code,
In this, i click next button -- move the next record. i click one more time it doesnt move
same as for previous button.
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection();
//SqlCommand cmd = new SqlCommand();
con.ConnectionString = "Data source=localhost;initial catalog=northwind;integrated security=true";
String cmd = "select * from employees";
//cmd.CommandType = CommandType.Text;
//cmd.Connection = con;
//cmd.Connection.Open();
SqlDataAdapter da = new SqlDataAdapter(cmd, con);
DataSet ds = new DataSet();
da.Fill(ds, "employeeinfo");
dt = ds.Tables["employeeinfo"];
tot = dt.Rows.Count;
Label5.Text = tot.ToString();
fill();
//SqlDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
//Label5.Text= Convert.ToString(dr.FieldCount);
//while (dr.Read())
//{
// TextBox1.Text = dr["employeeid"].ToString();
// TextBox2.Text = dr["firstname"].ToString();
// TextBox3.Text = dr["city"].ToString();
// TextBox4.Text = dr["country"].ToString();
//}
//Label5.Text=dr.RecordsAffected.ToString();
//GridView1.DataSource = dr;
//GridView1.DataBind();
//cmd.Dispose();
//dr.Dispose();
}
protected void Button6_Click(object sender, EventArgs e)
{
//First record
cur = 0;
fill();
Label5.Text = cur.ToString();
}
protected void Prev_Click(object sender, EventArgs e)
{
//previous record
cur--;
if (cur < 0)
cur = tot - 1;
fill();
Label5.Text = cur.ToString();
}
private void fill()
{
TextBox1.Text = dt.Rows[cur]["employeeid"].ToString();
TextBox2.Text = dt.Rows[cur]["firstname"].ToString();
TextBox3.Text = dt.Rows[cur]["city"].ToString();
TextBox4.Text = dt.Rows[cur]["country"].ToString();
Label5.Text = cur.ToString();
}
protected void Button8_Click(object sender, EventArgs e)
{
if (cur < tot - 1)
{
cur = cur + 1;
fill();
}
// //Next record
// cur = cur + 1;
// if (cur > tot-1)
// {
//// cur = 0;
// }
// else
// {
// fill();
// }
// Label5.Text = cur.ToString();
}
protected void Button9_Click(object sender, EventArgs e)
{
//Last record
cur = tot - 1;
fill();
Label5.Text = cur.ToString();
}
thanks,
murugavel
|
|
|
|
|
Murugavel Sadagopan wrote: protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection();
//SqlCommand cmd = new SqlCommand();
con.ConnectionString = "Data source=localhost;initial catalog=northwind;integrated security=true";
String cmd = "select * from employees";
//cmd.CommandType = CommandType.Text;
//cmd.Connection = con;
//cmd.Connection.Open();
SqlDataAdapter da = new SqlDataAdapter(cmd, con);
DataSet ds = new DataSet();
da.Fill(ds, "employeeinfo");
dt = ds.Tables["employeeinfo"];
tot = dt.Rows.Count;
Label5.Text = tot.ToString();
fill();
Put your code in condition.You page load event everytime fill the data on every events.
if(!isPostBack)
{
// Put your code here
}
please don't forget to vote on the post that helped you.
|
|
|
|
|
hi imran khan,
still i have the same problem.
thanks,
murugavel
|
|
|
|
|
Hi all
I have a user control with textbox fields to enter the address.
If the fields are empty, the validation summary will be displayed.
There is one checkbox on the control to fill up the text boxes if it is checked in.
When the validation summary is available on the page, and I click on the checkbox, to automatically fill the text boxes, it does not work.
Server side event is not getting fired when I check and uncheck the checkbox for the first time when validation summary is available on page.
I added, client side to event to CheckBox and then called __doPostBack event from the javascript. But postback is not happening.
I have following javascript
function OnCheckClick()
{
__doPostBack('SameAddressCheckBox','');
}
When I used the above script on "onclick" event of checkbox, after validation summary appears on page, when I try to check in the checkbox, validation summary goes away, but the checkbox is not getting checked in and server side event is also not called.
can anyone please suggest some thing so that postback can happen and will call serverside event.
Many thanks.
|
|
|
|
|
you do not need javascript in this case
CheckBox has properties AutoPostBack and OnCheckChanged.
in your ASPX something like
<asp:CheckBox runat="server" ID="chkTest" AutoPostBack="true" OnCheckedChanged="chkTest_OnCheckedChanged" />
in your ASPX.cs something like
protected void chkTest_OnCheckedChanged(Object sender, EventArgs e)
{
if (chkText.Checked)
{
// your code
}
else
{
// your code
}
}
Good Luck
|
|
|
|
|
Good Evening All
i have Link Buttons, when i test them localy they work, but after i Deployed my Site, The Link Buttons dont work. They look like just ordinary text. Here is the Site
http://www.TiyaneProperties.co.za/Tiyane/Home.aspx[^]
and Here is the Code in my Asp.NET Page
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="index" %>
<!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>Welcome to Tiyane Properties-Experience the Difference</title>
<script language="javascript" type="text/javascript">
function TABLE1_onclick() {
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<img src="Images/Tiyane_banner.gif" /><br />
<br />
<br />
<br />
<table>
<tr>
<td style="width: 128px; height: 21px">
<asp:LinkButton ID="btnGauteng" runat="server" OnClick="btnGauteng_Click">Gauteng</asp:LinkButton></td>
</tr>
<tr>
<td style="width: 128px">
<asp:LinkButton ID="btnNorthWest" runat="server" OnClick="LinkButton2_Click">NorthWest</asp:LinkButton></td>
</tr>
<tr>
<td style="width: 128px">
<asp:LinkButton ID="btnMpumalanga" runat="server" OnClick="btnMpumalanga_Click">Mpumalanga</asp:LinkButton></td>
</tr>
<tr>
<td style="width: 128px">
<asp:LinkButton ID="LinkButton4" runat="server" OnClick="LinkButton4_Click">Contact Agents</asp:LinkButton></td>
</tr>
<tr>
<td style="width: 128px; height: 28px">
<asp:LinkButton ID="btnaboutus" runat="server" OnClick="btnaboutus_Click">About us</asp:LinkButton></td>
</tr>
</table>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="background-color: #ff3333"></span>
<div class="footer">
<span style="background-color: #ff3333"></span>
</div>
<br />
<br />
<br />
<asp:Label ID="Label1" runat="server" ForeColor="Red" Text="Copyright © 2008 Tiyane Properties cc. All rights reserved. "></asp:Label><br />
</div>
</form>
</body>
</html>
What is Wrong?
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
What program are you using to develop your pages, i did not saw something like your first line of code(markup),and did you check your codebehind?
I Wish the Life Had CTRL-Z
Wizard's First Rule : People are fool,they believe what they want to believe or what they afraid to believe
www.subaitech.blogspot.com
|
|
|
|
|
hi
thanks for your reply
Am using VS2005
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|