|
Can you pastered this code? DB it's bind ,and update it.
|
|
|
|
|
Can you post the code? From your question, I doubt whether you are using web application or not. You may be binding the text area control in the page load. Now this binding code may have been written outside if(!IsPostBack) region. So, whenever you are clicking on the update button, postback is happening and control goes to the page load and it si rebinding the old value to the textarea. So, if you are doing so then put the data binding code inside !IsPostback region.
Either you love IT or leave IT...
|
|
|
|
|
Hi experts,
how to create dymamic textboxes using javascript in asp.net without postback
beula.
CMOTS Infotech,
Capital Market.
|
|
|
|
|
Use Google[^]
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
use Javascript friend...
But if then mind that you cannot find that in the server, you need ajax to post data of those controls.
Use :
var elem = document.createElement('input');
elem.type = 'text';
divelem.appendChild(elem); //divelem will be the container which holds the textbox.
|
|
|
|
|
|
Friends
I made a website without master page. And it works fine.
Now i add master page and compiled and tested locally, it works.
But as i upload it on server, it denies.
Than agin i remove that master page and again upload it, it works again.
Wats the problem. Am i doing something wrong or .......????
Help
|
|
|
|
|
masterpage has a content place holder in it .. If you add a masterpage, you must take into account that every control in contentplaceholder will change its identity when rendered in the client.
Please let me know what kind of errors you are getting. If it is related to client side, I think you need to change the javascript codes accordingly for each controls.
We dont have the facility to change the clientId now, it is included in .NET 2010.
So there is no way out to change the id of the controls that will be rendered in client side.
|
|
|
|
|
Oh,there are some OCX on master page, Maybe upload used OCX samed of master page COX.
|
|
|
|
|
What error exactly are you getting on the server?
Either you love IT or leave IT...
|
|
|
|
|
hi everyone!!!
i am using calendar control when i display the calendar i should dispose the previous dates.(or strike off)
sowmya
|
|
|
|
|
Use the day render event to find the dates and then strike out...e.g.
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if (e.Day.Date < (System.DateTime.Now))
{
e.Day.IsSelectable = false;
e.Cell.Font.Strikeout = true;
}
}
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Its very easy to do that, Just folow:
In your HTML:
<asp:calendar id="Calendar1" runat="server"
ondayrender="Calendar1_DayRender">
And in your code-behind:
protected void Calendar1_DayRender(object source, DayRenderEventArgs e)
{
if (e.Day.Date.Day < DateTime.Today.Day)
{
e.Cell.Controls.Clear();
e.Cell.Text = e.Day.DayNumberText;
e.Cell.BackColor = System.Drawing.Color.SmokeWhite;
}
}
It will Disable any date before today.
Hope you will get it..
|
|
|
|
|
How to add more than one table in a document while creating pdf file
|
|
|
|
|
|
How to add nested tables
|
|
|
|
|
hi, i am using an asp calendar control. i have written code for onSelectedIndexChange for the calendar control. but whenever i click on the calendar control, the whole page is getting refreshed. there is no autopostback property in the calendar control to stop refreshing the page. can anybody help me plz....
scarface
|
|
|
|
|
Can you show the code you have written..?
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
hey, thanks for such a quick reply....
i have a button, which when clicked, opens the calendar(calendar is inside a div whose display is none in the begining. when button is clicked, the display is 'block', so the calendar shows up.) but when a value is selected in a calendar(server control), the whole page is refreshed and the div display is 'none' again. this happens everytime i click on the calendar control....
scarface
|
|
|
|
|
scar_face wrote: when a value is selected in a calendar(server control), the whole page is refreshed
That's the way it behaves...The Calendar control included with ASP.NET uses postbacks only. If you don't want the users to notice it use AJAX update panel and keep the Calender control inside it.(Or else you can write your own javascript calender.There are plenty of them available on the web).
scar_face wrote: and the div display is 'none' again
You need to run the javascript again...You have the register the clientscript and run the script again once the page refreshes.(Or else set the display: block again)
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Rather than using ASP.Net calendar, you can go for any Java Script Calendar. or use Ajax Update panel to solve your problem.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Standard ASP.NET Calendar control will always do the postback. It is better to use the JavaScript, DHTML Calendar Controls. So many free JavaScript, DHTML Calendar controls are available free in the web. You can also use the AJAX calendar Control which will not do full postback. If you want to strict with the Standard ASP.NET calendar control, then I would suggest you to use AJAX Update Panel which removes full post backs.
Either you love IT or leave IT...
|
|
|
|
|
Public Function PopulateList() As DataSet
Dim cmd As New SqlCommand("select qt.department as dept, qt.custid as cusid, q.qotranid as qotranid,q.qoid as qoid,q.productid as proid,q.productname as pname,q.description as descr,q.qnty as qnty,q.price as price,q.tax as tax,q.total as total from quotation q ,quotetran qt where q.qotranid='" & ddlqo.SelectedItem.Text & "' and qt.qotranid='" & ddlqo.SelectedItem.Text & "' ", myConnection6)
myConnection6.Open()
Dim myDataReader As SqlDataReader
myDataReader = cmd.ExecuteReader()
While (myDataReader.Read()) = True
pid = myDataReader("proid")
Dim ad As New SqlDataAdapter("SELECT q.productid,s.productid,s.serialno as serialno from stockserialno s,quotation q where q.qotranid='" & Trim(ddlqo.SelectedItem.Text) & "' and q.productid=s.productid and s.status='A' and s.productid='" & productid1.Text & "' ", myConnection3)
ad.Fill(ds1, "stockserialno")
End While
myDataReader.Close()
myConnection6.Close()
Return ds1
End Function
I have tried above code but it display all the items in every row,but I need to display only those items that coresponding to paricular row.how can i do that?
|
|
|
|
|
Hi, what are those field do you want to display?
Hope this one can help.
Thanks
Hi, Please select Good Question if my answer are fit to your Question.
|
|
|
|
|
Only serialno of the particular product
|
|
|
|