|
check this
http://www.dotnetfunda.com/articles/article71.aspx[^]
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Loop all cells foreach row,when looping ends then save data in database.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
There are various way to do it. Its depends what is your current DataSource Type.
|
|
|
|
|
Hi all,
Im uploading a img gif( type gif animated). but it is saved as (type gif).why it isconverted as such . how to avoid it.
|
|
|
|
|
I dont really understand what is your problem
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Im uploading a gif animated image with 3 frames. but the image is not saved as animated one.I think 1 frame is saving other frames are not there. When i see the image properties i come to know that the image is saved as gif image not as gif image (animated). how to solve it . Can u get me now..
|
|
|
|
|
There is no Differents between the two. try to view the Gif without putting it in your page and see if it changes the images
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I found that from my application path. It is not animated outside also.The image is resized while saving . The resized image is may be the reason for this.Is there any possibility for this...
|
|
|
|
|
I got it Mr.Maseko. My guess is right. Resizing is the problem here.
|
|
|
|
|
ok Am glad you find the solution
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
<asp:menu id="menuTabs" runat="server" orientation="Horizontal" staticselectedstyle-cssclass="selectedTab" staticmenuitemstyle-cssclass="tab" cssclass="menuTabs" onmenuitemclick="menuTabs_MenuItemClick">
<items>
<asp:menuitem
text="VTT"
="" value="0" selected="true">
<asp:menuitem
text="Radar"
="" value="1">
<asp:menuitem
text="Laser"
="" value="2">
//solution
if you want to hide the 'laser' item, do this:
How can i do this?
Thanks in Advance.
|
|
|
|
|
<asp:MenuItem
Text="VTT"
Value="0"
Selected="true" />
<asp:MenuItem
Text="Radar"
Value="1"/>
<asp:MenuItem
Text="Laser"
Value="2"/>
Just visible="false"
try and try untill reach success..
|
|
|
|
|
no visible properties in MenuItem
|
|
|
|
|
Hi,
I have a gridview with paging. I need to print all the data in the gridview...not only the displayed page.
Also, if the grid contains only some of the data and the rest will come only when the user clicks on the last page number, printing should print all the other data that the datasource contains.
Please help.
|
|
|
|
|
|
I have got the solution...Not from the post you mentioned . It was the excat thing I wanted.
|
|
|
|
|
Dear All,
I am having a datagrid with Edit, Update, and Delete button columns and bound columns on my asp.net form, what i want to do is that when there is a value in a datagrid cell, then disable the Delete button.
For example:
if there is a value in DateReceived cell, the Delete button on that data row will be disabled, and if there is no value in DateReceived cell, the Delete button on that data row will be enabled.
I knew that i might need to use DataGrid ItemDataBound event, the following code disable the Delete button unless the Edit button been clicked, but this is not what i want.
private void dgrOrders_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
DataGridItem dgi = e.Item;
if ((dgi.ItemType == ListItemType.Item) || (dgi.ItemType == ListItemType.AlternatingItem))
{
LinkButton lb = (LinkButton)e.Item.Cells[11].Controls[0];
if (lb != null && lb.CommandName.Equals("Delete"))
{
lb.Enabled = false;
}
}
}
Can someone please shed a light in here for me, thanks heaps.
Andie
|
|
|
|
|
Suppose i have a server side method called Update() and i have one dropdown. when user select any element from dropdown then how could i call the server side method Update() by __doPostBack().
is it possible to call directly the method Update() by __doPostBack() if so then please help me with a sample code.
Thanks in advance.
tbhattacharjee
|
|
|
|
|
Tridip Bhattacharjee wrote: is it possible to call directly the method Update() by __doPostBack()
Directly No. but you can call any button event in __doPostBack().
So make hidden button any call it by __doPostBack() and in this event call your Update() method.
Viral
|
|
|
|
|
Check This Example:
.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test-file-upload1.aspx.cs" Inherits="test_file_upload1" %>
<!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>
<script language="javascript" >
function PostBack(t)
{
__doPostBack('Test',t.value);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" AutoPostBack="true" runat="server">
<asp:ListItem Value="1">1</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
<asp:ListItem Value="3">3</asp:ListItem>
<asp:ListItem Value="4">4</asp:ListItem>
</asp:DropDownList>
</div>
</form>
</body>
</html>
.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
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;
using System.IO;
public partial class test_file_upload1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DropDownList1.Attributes.Add("onchange", "PostBack(this);");
if (IsPostBack)
{
string strControlName = "";
strControlName = Request.Params.Get("__EVENTTARGET");
if (strControlName == "Test")
{
string strArgument = "";
strArgument = Request.Params.Get("__EVENTARGUMENT");
Update(strArgument);
}
}
}
private void Update(string strTest)
{
Response.Write("You have selectecd: " + strTest);
}
}
|
|
|
|
|
Hi all,
Im adding a image for banner.That image is a flash gif image . if i add that image the image doesnt produce the flash effect , what would be the reason.
<asp:LinkButton ID="LnkImage" runat="server" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"Owner_Id") %>'
CommandName="SongView">
<img src='<%#DataBinder.Eval(Container.DataItem,"uploadedphoto_id") %>' id="ImgAlbum"
runat="server" width="70" style="border: 0" height="70" /></asp:LinkButton>
|
|
|
|
|
Someone can help me, how to set height and width dynamically?
i try dis code
<script type="text/javascript">
function setSize(elem)
{
//find the height of the internal page
var the_height= elem.contentWindow.document.body.scrollHeight;
var the_width= elem.contentWindow.document.body.scrollWidth;
//change the height of the iframe
elem.height= the_height;
elem.width= the_width;
//alert(the_width);
}
</script>
<iframe id="Iframe1" src="Login.aspx" onload="setSize(this)" style="background-color: transparent" scrolling="no"></iframe>
iframe height function perfectly in ff,ie and chrome but iframe width not functioning in ff any one can help me?
|
|
|
|
|
how i change this code so that my code works
protected void DropDownList1_TextChanged(object sender, EventArgs e)
{
cnx.Open();
SqlCommand ddlcmd = new SqlCommand();
SqlDataSource1.SelectCommand = "SELECT max (Coupon_Info.Serial_End) AS SerialEnd FROM Coupon_Info INNER JOIN CouponType ON Coupon_Info.Coupon_TypeID = CouponType.CouponTypeID where CouponType.CouponName=" + DropDownList1.SelectedValue;
TextBox1.DataBind();
}
|
|
|
|
|
Where is error on your code? Do you get error message?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
I have a datareader and i am passing many strings one by one to a sub. I think i have to do dynamically but how can i do it.
The data looks like this
datetimestart
datetimeend
String
String
cboStringM
i don't know the data in adv.. i am looping thru one by one. i don't know how many strings i will encounter. i can encounter 3 or 4 or 1 but i need to display the textbox for each string i pass and same goes for the listbox.
When i pass the datetimestart i show the calendar control.
When i pass the datetimeend i show another calendar control.
When i pass the String i show the textbox.
When i pass the second String i show another textbox.
when cboStringM then a listbox
But the second textbox is not showing. When the first string is passed the firsttextbox is set to true when when the second strings turn comes the firsttextbox is already true and it doesn't go to the second one.
That is my problem. How can i show both the textboxes when 2 strings are passed of the same name.
here is the code
Dim ParameterReportType As New Data.SqlClient.SqlParameter("@id", SqlDbType.VarChar, 50)
ParameterReportType.Value = Request.QueryString("id")
myCommandReportType.Parameters.Add(ParameterReport Type)
Dim objReaderparam As SqlDataReader = myCommandReportType.ExecuteReader()
Dim DisplayedName As New ArrayList
Dim ParameterType As New ArrayList
Dim ParameterName As New ArrayList
Dim DataSource As New ArrayList
Dim Hidden As New ArrayList
Dim DefaultValue As New ArrayList
Dim DatabaseSourceNumber As New ArrayList
While objReaderparam.Read()
DisplayedName.Add(objReaderparam.Item("DisplayedNa me"))
ParameterType.Add(objReaderparam.Item("Parameterty pe"))
ParameterName.Add(objReaderparam.Item("ParameterNa me"))
DataSource.Add(objReaderparam.Item("DataSource"))
Hidden.Add(objReaderparam.Item("Hidden"))
DefaultValue.Add(objReaderparam.Item("DefaultValue "))
DatabaseSourceNumber.Add(objReaderparam.Item("Data baseSourceNumber"))
formattable(objReaderparam.Item("DisplayedName"), (objReaderparam.Item("Parametertype")), (objReaderparam.Item("ParameterName")), (objReaderparam.Item("DataSource")), (objReaderparam.Item("Hidden")), (objReaderparam.Item("DefaultValue")), (objReaderparam.Item("DatabaseSourceNumber")))
End While
objReaderparam.Close()
Sub formattable(ByVal DisplayedName As String, ByVal Parametertype As String, ByVal ParameterName As String, ByVal DataSource As String, ByVal Hidden As String, ByVal DefaultValue As String, ByVal DatabaseSourceNumber As String)
If Parametertype = "datetimestart" Then
Calendar1.Visible = True
End If
If Parametertype = "datetimeend" Then
Calendar2.Visible = True
End If
If Parametertype = "date" Then
Calendar1.Visible = True
End If
If Parametertype = "cboStringM" Then
DataSource = Right(DataSource, Len(DataSource) - 1)
Response.Write(DataSource)
Dim MyDataAdapter As SqlClient.SqlDataAdapter
MyDataAdapter = New SqlClient.SqlDataAdapter(test, conntest)
Dim dataSet As DataSet = New DataSet
MyDataAdapter.Fill(dataSet)
Dim dt As DataTable = dataSet.Tables(0)
ListBox1.DataSource = dt
ListBox1.DataTextField = dt.Columns(0).ColumnName
ListBox1.DataValueField = dt.Columns(1).ColumnName
ListBox1.DataBind()
ListBox1.Visible=True
End If
If Parametertype = "String" Then
TextBox1.Visible = True
End If
end sub
<asp:Calendar ID="Calendar1" runat="server" Visible="False"></asp:Calendar><br /><br /><br />
<asp:Calendar ID="Calendar2" runat="server" Visible="False"></asp:Calendar>
<asp:ListBox ID="ListBox1" runat="server" Visible="False" SelectionMode="Multiple"
></asp:ListBox>
<asp:TextBox ID="TextBox1" runat="server" Visible="False"></asp:TextBox><br /><br />
<asp:TextBox ID="TextBox2" runat="server" Visible="False"></asp:TextBox><br /><br />
modified on Wednesday, July 29, 2009 6:53 PM
|
|
|
|