|
If i debug, i can see it going to submit_click on refresh of the page (ie, the last event fired. if it was another event which was fired before refresh, then that event will be fired on refresh)
|
|
|
|
|
If i press F5 the event which was fired is fired again.
|
|
|
|
|
I have a form with submit button as an asp image button. My problem is that if i click the button n times the event is fired n times. so how to disable button during the post back. I tried onclientclick="this.enable =false; return true", but didnt work. Is there any other solutions
minah
|
|
|
|
|
You can actually knock off the submission ability on postback. ImageButtons don't support that Enable right?
|
|
|
|
|
i didnt get what you mean by submission ability. I tried this.disabled=disabled also
|
|
|
|
|
Hi! in GridView, in a certain cell, there is a child control. it may be a LinkButton or A Label or a Button web control. i represent rffernce of this child control in DataBound event as:
Object O = e.Row.Cel[0].Control[0];
now i want to know type of the web control object O have.
how can i do this?
Thanks & Regards,
SAMir Nigam,
Software Engineer,
STPL, Lucknow, India.
|
|
|
|
|
You can use the is operator to check for types:
if (O is LinkButton) ...
You can use the as operator to get a reference only for specific types:
LinkButton b = o as LinkButton;<br />
if (b != null) ...
---
single minded; short sighted; long gone;
|
|
|
|
|
Wouldn't a NULL check and then calling GetType() tell you?
|
|
|
|
|
I am using ReportViewer control in Update panel, when run the application i can't use some commands on report viewer tool bar like Print and export.
why it is so ?? is ther any solution available ???
And also tell me is there way to override these commands.
Thanks in Advance
|
|
|
|
|
hi, i need to create a application where user will select a indian languages from drop down, and after that all content of page should be displayed in selected language and he will enter the data in selected language. Please provide help.
ASDFASDF
|
|
|
|
|
earlier i was using
sqldataadapter = new SqlDataAdapter(cmd);
sqldataadapter.fill(dataset)
to get data from database, and use to bind it to datagrid. but as i do not use this datagrids for editing. i want to use datareader instead of dataset.
The number of columns will not be fixed so i can not create datatable with fixed number of columns and fill it by iterating through datareader.
i do not want to use ' sqldataadapter.fill(datatable); ' either.
every suggestion welcome ..thanks in advance.
pallavi
|
|
|
|
|
Pallavi,
Firstly you have to provide structure to the datatable i.e. column names and datatypes....
Once you have the structure set you can loop through your datareader and add one row at a time to your DataTable.
You can provide structure to your datatable even after you have data in your datareader!
Gautham
|
|
|
|
|
thank u gautam .
but i have three different querries in switch case . and i am going to bind to datgrid according to selected criteria.
so, according to u may i hv to make ready different datatables with the different structures? isnt it there any easy way as--
datatable= (datatable)datareader ; (kidding. but i want it as flexivble as dataset).
thank u.
pallavi
|
|
|
|
|
Why don't you want to use the DataAdapter.Fill method? If you want the data in a DataTable you will be doing the same thing as that method does anyway.
---
single minded; short sighted; long gone;
|
|
|
|
|
thank u guffa,
though dataadapter.fill(........) uses datareader behind the scene, as per requirement i have to use datareader in my code.
plz help.
thanks in advance
pallavi
|
|
|
|
|
Pallavi Bhoite wrote: as per requirement i have to use datareader
Ok, then you just have to (more or less) rewrite the Fill method in your own code.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hello,
I have a grid view with one column and populated that with the following code,
GridView1.DataSource = PropList;
GridView1.DataBind();
Where PropList is a List of string .
Now I have added another column in the GridView1 by the following code
BoundField b;
b = new BoundField();
b.HeaderText = "new1";
GridView1.Columns.Add(b);
Now my problem is that if I have another list of string, How i Add that list to the new column.
Please help me in this regards.
Thanks
sunil
|
|
|
|
|
You cannot. You'd need a list of a struct which has two properties, as you can only bind to one source, but you can set the columns to pull data from properties of items in your list.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
Can you please give me sample code for this.
Thanks,
sunil
|
|
|
|
|
Hi All,
Is there any other way except <div>
to place multiple forms in one page. I am doing development in ASP.Net 2.0.
Please suggest and have a nice day!!.
Amit
|
|
|
|
|
When you ask about divs, you're asking about HTML. ASP.NET is therefore irrelevant. The answer is that you can break stuff up on a page many ways, but if you want multiple forms on a page ( aspx files ), you can't do it. You can create as many pages as you like as controls ( ascx files ) and put as many of those on a page as you like.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks!! I understand Div are part of HTML. Ok let me put my question in this way...I have three forms say a.aspx,b.aspx, c.aspx and i want to display all them in one go in browser.
All three forms are having their own controls and buttons which will do different action. So user can submit relevant form back to server.
Any views?
|
|
|
|
|
Hi
my gridview is below:
<asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False"
CellPadding="0" EmptyDataText="-- Kayıt Yok --" GridLines="Horizontal" Width="100%">
<RowStyle CssClass="TDS" />
<AlternatingRowStyle CssClass="TDS" BackColor="#F7F6F3" />
<Columns>
<asp:BoundField DataField="title" HeaderText="Kongre Adı">
<HeaderStyle CssClass="TDColoredHeader" HorizontalAlign="Left" VerticalAlign="Middle" />
</asp:BoundField>
<asp:BoundField HeaderImageUrl="~/images/seperator.gif">
<ItemStyle Width="2px" />
<HeaderStyle CssClass="TDColoredHeader" />
</asp:BoundField>
<asp:TemplateField HeaderText="Sil">
<ItemTemplate>
<asp:TextBox runat="server" CssClass="Textbox" ID="Textbox1" Text=""
MaxLength="200" Width="100%"></asp:TextBox>
</ItemTemplate>
<ItemStyle Width="200px" />
<HeaderStyle CssClass="TDColoredHeader" HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
</Columns>
</asp:GridView>
When i run the project, i cannot see the Textbox on the page. What's my mistake?
If i don't add a server-side control, it works. But i have to add a server-side control.
ozgur.nevres
|
|
|
|
|
Hi.....
One of the my webform contain some dropdownlist and
text box (multiline).Suppose there is a data entry operator
filling any employee information while filling information he
can't remember some information about employee and he fill
some information in textbox and select some value ifrom dropdown
list and then he goes to other 2-3 different form and read the
information that he need and come back to origenal
page where he filling the information.When he come then all
the information that he fill before going to other page should
be remain as it before.
How can i do this? i am tying session but session hav a limit to
store data in it and the operator can fill a large amount of data.
how can i do this?Is there any other way?
df
|
|
|
|
|
Don't know if this will help but why don't you append the operators text in a string builder and set the Session equal to the string builder. Its only one object... so when u read from the session cast the session data to a string builder and read from it.
|
|
|
|