|
Hi, thanks for the reply...I have tried it using the <ItemTemplete>.
but now, the problem is whenever user enters something in textboxes, I want to update those values in database..
How could I do that? plz help me....
|
|
|
|
|
Give me ur HTML source code of gridView
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
here is my source code:
<asp:GridView ID="myGridView1" runat="server" Width="483px" CellPadding="4" ForeColor="#333333" AutoGenerateColumns="False" DataSourceID="AccessDataSource1" AllowPaging="True" OnSelectedIndexChanged="myGridView1_SelectedIndexChanged">
<Columns>
<asp:BoundField DataField="Sno" HeaderText="SNo" SortExpression="Sno"/>
<asp:TemplateField HeaderText="PartNo">
<ItemTemplate>
<asp:TextBox runat="server" ID="txtPartNo">
</asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Manufacturer">
<ItemTemplate>
<asp:TextBox runat="server" ID="txtMfg">
</asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Quantity">
<ItemTemplate>
<asp:TextBox runat="server" ID="txtQty">
</asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#EFF3FB" />
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/db1.mdb"
SelectCommand="SELECT [Sno] FROM [RfqInfo]" UpdateCommand="UPDATE [RfqInfo] SET [Partno] = txtPartNo.Text, [mfg] = txtMfg.Text, [qty] = txtQty.Text WHERE [Sno] = Sno">
</asp:AccessDataSource>
Is that UpdateCommand true??
|
|
|
|
|
i need a javascript to populate a dropdownlist.on the basis of CountryId the State dropdownlist must be bind
Regards,
Magi
|
|
|
|
|
Hi
I am giving u sample code.U can change as per ur requirement.
I have two dropdown one for conurty and other for country language.
On click of country I bound its language using javascript.
See
function countries()<br />
{<br />
indx=document.getElementById('dd_country').value;<br />
<br />
if(indx=="US")<br />
{<br />
langauge=new Array("English","Español");<br />
language_code=new Array("en","es");<br />
}<br />
else if(indx=="AU" || indx=="UK" || indx=="HK" || indx=="IE" || indx=="SG")<br />
{<br />
langauge=new Array("English");<br />
language_code=new Array("en");<br />
}<br />
<br />
opts=document.getElementById('dd_languages').options;<br />
<br />
for (a = opts.length; a >-1; --a) opts[a] = null;<br />
<br />
for (var i=0; i < langauge.length;++i){<br />
languages(langauge[i],language_code[i],opts);<br />
}<br />
}<br />
<br />
function languages(lng,cnd,opts)<br />
{<br />
<br />
var optn=document.createElement("OPTION");<br />
optn.text = lng;<br />
optn.value = cnd;<br />
opts.options.add(optn);<br />
}
asp:DropDownList ID="dd_country" runat="server" CssClass="SmallTxt1" Width="100px" onclick="countries();" >
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
hello
how to resize table column at runtime using mouse
please help
|
|
|
|
|
ankur1234 wrote: how to resize table column at runtime using mouse
I don't believe that either was designed for that purpose: they are
structural, not interface, elements. Using them like you propose to
is like using FONT elements and non-breaking spaces for layout: it's
a bad idea and misuse of the elements. If you want to use a resizable
partition, use frames
|
|
|
|
|
correct!!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|
|
Hi,
I published an ASP.net web application using precompiled files way, when I try to browse the web site from the internet, every javascript word is convertted to _avascript in the source of the page !!
which corrupts all javascript code, including even LinkedButton Click events
But when i browse the web site from within the server manchine itself, it works well
(using both http://localhost/website or http://realipaddress/website)
Regarding that another website hosted on the same server has the same problem and This problem appeared only after the network administrator changed the firewall, i am not sure if this what caused the problem.
Would anyone help we with that please ...
Knights' Scent
|
|
|
|
|
can u share your website url?
|
|
|
|
|
Any one share any source code to use repeater control with web.sitemap file....
Amit
|
|
|
|
|
Hi,
In order to handle the error i.e page cannot be dsplayed when we upload file size more than 4 mb using Fileupload control: Iam writing the following code in Global.asax file:
void Application_Error(object sender, EventArgs e)
{
// Code that runs when an unhandled error occurs
// Fires when an error occurs Check to see whether we came from the upload form
string fn=System.IO.Path.GetFileName(Request.Path).ToString();
if ( fn== "default.aspx")
{
//Get error details
System.Exception appException=Server.GetLastError();
HttpException checkException=(HttpException) appException;
//Verfy the expected error
int code = checkException.GetHttpCode();
if((code==500) ||(checkException.ErrorCode==-2147467259))
{
// Error 400 = bad request, user
// tried to upload a file that's too large
Session["ImageTooLarge"] = 1;
Server.ClearError();
//Go to the original target page
Response.Redirect("default.aspx");
}
}
and in the Default.aspx page load is like this:
if (!IsPostBack)
{
// Check to see whether we were redirected from the error page
int i=Convert.ToInt32(Session["ImageTooLarge"]);
if (i==1)
{
lblTooLarge.Text = "Exceeded";
}
but still I am getting page not displayed error. When I try to debugg the Application_Error event is firing in that event it is storing 1 into session, but the page is not redirecting to Default.aspx page.
What I am doing wrong.
Thanks in advance.
|
|
|
|
|
kalkumar wrote: but still I am getting page not displayed error.
This is because you cannot catch MaxRequestLength error from the code until you set a maximum value to the MaxRequestLength in the web.config and then check for the size. For example, set the MaximumRequestLength = 100MB and then check the file which does not exceeds 50MB.
|
|
|
|
|
hello
iam using the upload control with listbox for my list atach file, i wish to have 2 button
add file and delete file
i am trying use update panel asp net 2.0 but when a click button add or delete i see postbak in my page
some one know why this acction in my update panel
thank for the time
|
|
|
|
|
[img]http://foo.no-ip.org/images/skinerror.gif[/img]
When I run the page, the skinned controls show correctly. But for some reason in design view the controls have errors on them. Is there a way to remove these errors? Are they false errors? If they are errors that I need correcting, how do I do so? The pages are working fine so this is confusing. Thanks in advance.
|
|
|
|
|
Hi,
By default Gridview will display the horizantal verical lines between rows and columns cells. How to remove those lines from the Gridview.
Thanks in advance
|
|
|
|
|
You will have to set the property GridLines="None" .
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
Dear All
i have to implement a audio mixing on web based application.i would upload audio file than i make a interface where all audio files would be displayed in datalist(Asp.Net2.0/C#).But i need a dll/API which can track the audio file track in bit so that i can mix that audio files.
In desktop application audio mixing is possible & also i have lots of dll for that because it needs system32/win32 OS files. i had mixed audio files by OS-XP by movie maker.But i have to implement the same thing in web application.
By applying embedding media player in web application media player certain properties can be accessible but mixing still i am not able to implement.
SO i need a feedback regarding this requirements as soon as possible.
Thanks
|
|
|
|
|
Basically I want to do something like this:
Code:
on the .aspx page
setHorizontalLabels([<%# Function %>]);
"Function" being a function in my .aspx.cs that returns an array
I just can't seem to get my <% %> to be recognized within the script tag.
Any thoughts?
-----------------------------------------------------------
Completion Deadline: two days before the day after tomorrow
|
|
|
|
|
Javascript is client side. The code in the aspx.cs is running on the web server. You will not be able to call this code from javascript like you are trying to. You could try to use some ajax, so the javascript behind the scenes is calling the webserver.
Ben
|
|
|
|
|
Hi
For the same button (asp:button) i want to raise alert and confirm window.
depending on condition either alert should be displayed are confirm window
plz help e in this
thank you
Archu
Archu
|
|
|
|
|
You can emit the code from codebehind (codefile in 2005) .Attributes.Add("onClick","methodCall()");
|
|
|
|
|
in my application i have used a datagrid which has checkboxes .
and an image button "submit"
when ever you click the submit button first it should check whether the items in the grid are selected are not
If selected it should display confirm msg"do u want to submit"
If checkboxes are not selected in the grid ,
and when u press the submit button it should diplay
an alert msg "Select the items in the grid"
confirm and alert mesages must be in javascript.
pls help me in this its very urgent
For the same button i hav to check 2 conditions
depending on the conditions it should display related confirm or alert msg
thank you
Archu
Archu
|
|
|
|
|
Well, if it's URGENT let me drop everything for you.
Please read the forum guidelines.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
function fn()
{
var count="no of checkboxes";
var chked="false";
while(count>0)
{
var chk=document.getElementById("check_box_name");
if(chk.checked=="true")
{
chked="true";
}
count=count-1;
}
if(chked=="true")
return confirm("Do you want to save?");
else
alert("please check the chkboxes");
}
}
And yes do abide by the forum guidelines!!!
I was born dumb!!
Programming made me laugh !!!
--sid--
|
|
|
|