|
<form id="Form1" method="post" runat="server">
<asp:textbox id="TextBox1" style="Z-INDEX: 101; LEFT: 264px; POSITION: absolute; TOP: 104px"
runat="server"></asp:textbox><asp:datagrid id="DataGrid1" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:BoundColumn DataField="Name"></asp:BoundColumn>
<asp:BoundColumn DataField="Id" Visible="False"></asp:BoundColumn>
</Columns>
</asp:datagrid>
<asp:Button id="Button1" style="Z-INDEX: 102; LEFT: 160px; POSITION: absolute; TOP: 224px" runat="server"
Text="Button"></asp:Button></form>
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
DataTable dt = new DataTable();
dt.Columns.Add(new DataColumn("Name"));
dt.Columns.Add(new DataColumn("Id"));
DataRow dr = dt.NewRow();
dr["Name"] = "Abccbdfejkerhjerjje";
dr["Id"] = "324";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["Name"] = "Abc cbd fejkerhj erj je";
dr["Id"] = "325";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["Name"] = "Abc cbd fejkerhj erj je";
dr["Id"] = "326";
dt.Rows.Add(dr);
DataGrid1.DataSource = dt;
DataGrid1.DataBind();
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void Button1_Click(object sender, System.EventArgs e)
{
string ids = string.Empty;
for(int i=0;i<DataGrid1.Items.Count;i++)
ids += DataGrid1.Items[i].Cells[1].Text + ",";
Response.Write(ids);
}
}
just check it in button click, I am taking all the ids
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
|
|
|
|
|
thanx i m getting IDs
but not on my Update command event.
my event is....
Private Sub Dtgrd_Products_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles Dtgrd_Products.UpdateCommand
Dim txtId As TextBox = CType(e.Item.Cells(2).Controls(0), TextBox)
'Dim txtid As String = e.Item.Cells(2).Text
Dim txttype As TextBox = CType(e.Item.Cells(4).Controls(0), TextBox)
Dim txtdia As TextBox = CType(e.Item.Cells(5).Controls(0), TextBox)
Dim txtlength As TextBox = CType(e.Item.Cells(6).Controls(0), TextBox)
Dim txtLamType As TextBox = CType(e.Item.Cells(7).Controls(0), TextBox)
Dim txtVarType As TextBox = CType(e.Item.Cells(8).Controls(0), TextBox)
Dim txtcol1 As TextBox = CType(e.Item.Cells(9).Controls(0), TextBox)
Dim txtcol2 As TextBox = CType(e.Item.Cells(10).Controls(0), TextBox)
Dim txtcol3 As TextBox = CType(e.Item.Cells(11).Controls(0), TextBox)
Dim txtcol4 As TextBox = CType(e.Item.Cells(12).Controls(0), TextBox)
Dim txtcol5 As TextBox = CType(e.Item.Cells(13).Controls(0), TextBox)
Dim txtcol6 As TextBox = CType(e.Item.Cells(14).Controls(0), TextBox)
conn = New SqlConnection(constr)
cmd = New SqlCommand("spr_UpdateProductDetails", conn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add(New SqlParameter("@Id", txtId.Text))
cmd.Parameters.Add(New SqlParameter("@type", txttype.Text))
cmd.Parameters.Add(New SqlParameter("@dia", txtdia.Text))
cmd.Parameters.Add(New SqlParameter("@length", txtlength.Text))
cmd.Parameters.Add(New SqlParameter("@laminate_type", txtLamType.Text))
cmd.Parameters.Add(New SqlParameter("@varnish_type", txtVarType.Text))
cmd.Parameters.Add(New SqlParameter("@col1", txtcol1.Text))
cmd.Parameters.Add(New SqlParameter("@col2", txtcol2.Text))
cmd.Parameters.Add(New SqlParameter("@col3", txtcol3.Text))
cmd.Parameters.Add(New SqlParameter("@col4", txtcol4.Text))
cmd.Parameters.Add(New SqlParameter("@col5", txtcol5.Text))
cmd.Parameters.Add(New SqlParameter("@col6", txtcol6.Text))
conn.Open()
cmd.ExecuteNonQuery()
Dtgrd_Products.EditItemIndex = -1
conn.Close()
bindgrid()
End Sub
here in every textboxes i m getting null.
any suggetion..
|
|
|
|
|
I have a file js, in file I want exit and don't execute all code after command exit.
My program contain code java script and window script host.
expect your have of you
thank you.
Regards.
|
|
|
|
|
'return ' in the place of function code.
|
|
|
|
|
Sir,
Can anybody tell me how can I deploy an application in server without creating the deployment. Means is there any way to directly dumping few files of the application in to the server in a virtual directory and try to access the application using browser. Is it possible if possible please tell me in detail. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Copy the project folder and paste it on the server and set virtual directory for the root folder.
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
|
|
|
|
|
What do you mean total folder. Then how can I maintain security for my code. Do I need to paste the total folder without even missing a single file. May be need to copy few files and leave other files. May be I guess. If its wrong please tell me the reason. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
I just told you the simple way.
Files need to be copied :
dll files - including bin folder
content files - aspx, js, images..etc (no need to copy .cs or .vb )
Report files - .rpt
The folder structure should be like your working environment
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
|
|
|
|
|
Thank you very much sir.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Ok. Thank you. Dont I need to copy .resx(resource) files. If I copy them what will happen. Please tell me. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi all,
Can anybody tell me how can I get the Ip Address of the server machine at run time. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Request.ServerVariables["SERVER_NAME"]
For more info :
http://www.w3schools.com/asp/coll_servervariables.asp
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
|
|
|
|
|
Ok. Thank you dear. Thank you very much.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
System.Net.Dns.Resolve(Server.MachineName)
|
|
|
|
|
Hi all,
I have created deployment for an application in which I put a folder named Pics. In this folder I put some images. Can anybody tell me when I am deploying it I need this folder to be included in virtual directory which is being created automatically. Means this Pics folder and images in it must be included automatically in the created virtual directoy automatically.
And actually when I was creating the deployment, I have selected the Pics folder too in it. Still it is not being included when I am deploying it in the server machine. Please tell me all the details clearly. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi all,
Can naybody tell me what is the use of .resx file or resource file. If these two are different then tell me what is the difference. And how can I create .resx and resouce file. Tell me in detail please. Thank you.
Regards,
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi, This not possible to explain here in detail plz refere this URL
http://msdn2.microsoft.com/en-us/library/ms227427(VS.80).aspx
Parwej Back...............DON of Developer.......
Parwej Ahamad
g_parwez@rediffmail.com
|
|
|
|
|
Ok. Thank you Don. May be Don from Hyderabad. Is it right?
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
hi friends
i have 7 textboxes in tablecolumn.if i enter the values in 7 textboxes it should be stored in dabase.(it's worked fine).
when the users reenters value inside same textboxes it should not be accepted or the value entered by the first user should not be changed.
thanks
regards
saravanan
|
|
|
|
|
After adding the values make it read only so that another user won't change it
|
|
|
|
|
maybe you change the textbox's read only property as true after the textbox's value be stored in database. make the textbox read only property as false when initialize it.
|
|
|
|
|
hi all, can anyone tell me the answers for these questions.
- What is winforms and webforms?
- What is assembly and how we can convert private assembly to shared assembly?
- What is run time component?
Thanks,
Rahithi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
Does google not work where you live ? Where are these questions coming from ? Smells like homework to me.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi Christian,
Thanks for the response. google is working fine (i can say google is a friend of mine,but code project is a best friend of me). the problem is (as a newbie for this .net technology),i am not that intelligent to filter the answers..i mean by googling i am finding too many (indirect) answers for the single concept. whatever i asked here about .net techonlogy are very basic questions. i thought our friends here are experianced in .net, these questions are very simple for them to answer...i thought it will not going to waste their time in answering this kind of questions.
really i don't know that we shold not post this kind of queries here.
Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|