|
Hi,
Could Some one help me tell me how I would go with editing a datagrid using a ListBox? I mean whe at the prssing of edit a textBox comes and the user can insert new records.
Thank you.
|
|
|
|
|
I'm not very sure what you meant by "editing a datagrid using a ListBox".
Can you give us more details about what you wanna do with Listbox for editing a datagrid?
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message. Thank you.
|
|
|
|
|
Hi micheal,
This is actually what I ment. I want the user to be adding data into Sql database using a datagrid. So I'm using a ListBox to do this and edit update and delete. I placed listbox in EditItemTemplate and label in ItemTemplate. but when I try now to edit it does not bring the lisbox but i can read the grid with the sql content. my code actually looks like this:
public void Edit_dgid(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
dgid.EditItemIndex = e.Item.ItemIndex;
BindDataGrid();
}
public void Cancel_dgid(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
dgid.EditItemIndex = -1;
BindDataGrid();
}
public void Update_dgid(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
System.Web.UI.WebControls.ListBox st=new System.Web.UI.WebControls.ListBox();
st=(System.Web.UI.WebControls.ListBox)e.Item.Cells[5].FindControl("lbachobj");
System.Web.UI.WebControls.ListBox st1=new System.Web.UI.WebControls.ListBox();
st=(System.Web.UI.WebControls.ListBox)e.Item.Cells[4].FindControl("lbobj");
SqlCommand myCommand=new SqlCommand();
myCommand.Connection=con;
myCommand.CommandText="insert into Object,AchievedObject where @Object,@AchievedObject";
myCommand.Parameters.Add(new SqlParameter("@AchievedObject",SqlDbType.Text));
myCommand.Parameters["@AchievedObject"].Value=st.SelectedValue;
myCommand.Parameters.Add(new SqlParameter("@Object",SqlDbType.Text));
myCommand.Parameters["@Object"].Value=st1.SelectedValue;
con.Open();
myCommand.ExecuteNonQuery();
con.Close();
dgid.EditItemIndex=-1;
BindDataGrid();
}
Thanks.
|
|
|
|
|
Hi there,
I am creating a website first time. I want to upload it but for that I have to create an index.html file. Can you please tell me that what should I do? or how can I call my php file while index.html is load?
Please reply if you know.
Thank You in advance.
|
|
|
|
|
That is a server default, if you are using something other than regular HTML you must have the correct server running on the host machine in order to interperet the requests etc...
Cleako
|
|
|
|
|
To make this job simpler, I recommend that you get Dreamweaver 8.
This program is fabulous and easily aids in the development of web pages.
About the index.html thing, it is necessary to have it as that for the server to display that page when someone accesses your domain.
|
|
|
|
|
just Add your php file as default in IIS manager.
The following steps can be used if you are using IIS locally.
- Virtual Directory -> Properties -> Documents
- Click "Add" button.
- Type your php file.
- Click "OK"
but if you are using online IIS manager then you hav to ask ur hosting service.
nothing required to load PHP file from HTML file
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message. Thank you.
|
|
|
|
|
Hi all,
I used DefaultButtons in .net 1.1 to handle "pressing enter" and it works but when i used it in .net 2.0 it didn't work. if anyone has any idea??
|
|
|
|
|
|
Hi there HTML Masters!
I´ll try to figure out my actual enviroment.
I have a html file with 2 iframes (A & B lets say).
The point is that A is a login/pass page, when i submit the form in A, something should loads in B as well as in A a second page with "login Succesful" is loaded. I dont have problem with that.
Now the problem. iFrame A should ignore that "login Succesful" response page and load other page of my choice. I think i need to handle that response page but i dont know how...
any suggestion?
thanks in advance;P
Marcos
|
|
|
|
|
hi!
whenever an click event of any control occurs in my C# asp.net web application(visual studio.net 2003), form load is called again and all controls are initialized. Like i m using check box in my grid and want to capture my check state against any button click. But when i click button then form is again loaded and all check boxex became converted in their default state(which is unchecked).
therefore the following condition in my button click event alwayx bacame false coz at that time no check box is in checked state.
the condition is
if(checkbox.checked)
i have many other problems also due to this from loading against any event. Therefore can u tell me how to stop this loading every time.
|
|
|
|
|
you have to check whether the page is postbacked or not. then only you can fix this.
if (!ispostback)
{
}
And check the autopostback property of the checkboxes.
Sathesh Pandian
|
|
|
|
|
plz can u tell me how can i check whether the page is postbacked or not. then how can i fix this.
if (!ispostback)
{
}
actually i know how to check the auto post back property of checkbox but not form.
thanx
|
|
|
|
|
if the page get postbacked then all the variables are reinitialized.
So the values are become null otherwise not selected.
So try to use if(page.ispostback= false)
{
code is here..............
}
try this
Sathesh Pandian
|
|
|
|
|
Hi All,
I am designing an application using HTML.And Frames are used for that.
In my main window there are 3 rows.I need to use title bar(including minimize,
maximize and close buttons in each source in this Frameset.Means to close each frame from a frameset.
Is it possible?
Thanks In advance,
Jeeva
|
|
|
|
|
try this in a aspx page.
create every forms(html files ) in the code behind file and give the elements name properly.
for example
reponse.write("")
reponse.write("")
reponse.write("
|
|
|
|
|
Hai Satheesh,
Thanks for the reply.Can u plz specify what the JavaScript contents will be.I wrote this in a button click of .aspx page.But the code is written in the frame where the event generated.
Jeeva
|
|
|
|
|
you have to set the clicked events for a function .
sample code is like the below.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<title>Untitled Page
function buttonClick()
{
....
}
Sathesh Pandian
|
|
|
|
|
if you are going to close the frame then you can use
document.close
Its better to use div elements instead of frames.
Sathesh Pandian
|
|
|
|
|
Why on earth would you put that in the code? or even in an aspx page? it can go in a plain old HTML page, the framesets will still get parsed by the server!
|
|
|
|
|
he only needs it. see the question.
All The Best
Sathesh Pandian
|
|
|
|
|
Hello!
How can I command browser (IE 6) to wait until the page gets loaded fully? My web pages uses asp, html, javascript and dhtml. I don't want the specific page gets loaded partially by the browser but gets displayed fully when the loading is done. Is there any statement in coding what enables or disables such feature?
Thanks
Journey
|
|
|
|
|
Maybe you can set the display of the body to none:
<body style="display:none">
and clear it via javascript when your page is fully loaded.
Wout Louwers
|
|
|
|
|
I am working on a simple page (first one), intention is to allow operator to select several file names from a list and download them. My files are listed in lstLogFiles. Without the loop a selected log file can be downloaded, with this code the first selected log file can be downloaded, but only the first. I may be not understanding something (obviously) any idea why or what I need to do?
Private Sub btnDownLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDownLoad.Click<br />
Dim fullpath As String<br />
Dim i As Integer<br />
<br />
For i = 0 To lstLogFiles.Items.Count<br />
If lstLogFiles.Items.Item(i).Selected Then<br />
fullpath = lblCurrentPath.Text & lstLogFiles.SelectedItem.Text<br />
DownloadFile(fullpath, True)<br />
End If<br />
Next<br />
End Sub
Thanks in advance
|
|
|
|
|
I haven't tested this or played with it...but just looking at the code you supplied it seems like this line:
fullpath = lblCurrentPath.Text & lstLogFiles.SelectedItem.Text
should be something more like this
fullpath = lblCurrentPath.Text & lstLogFiles.Items.Item(i).ToString
|
|
|
|