|
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
|
|
|
|
|
If we register our product with Microsoft, how much do we have to pay Microsoft?
|
|
|
|
|
A million dollars. Send it to me, I'll pass it on.
( Express editions are free )
|
|
|
|
|
Guess that is a great answer for sure.
|
|
|
|
|
Hi, millions of dollars? a lot of money. You can use express edition its totally free.
Hope this one can help.
Thanks
Hi, Please select Good Question if my answer are fit to your Question.
|
|
|
|
|
I'm using asp:GridView on a page that uses a Master Page, and I added a template field to grid so that I can pop up a window instead of taking them to a full page.
When I click on the link that should call the script to open the popup, I get the error "Microsoft JScript runtime error: Object expected", & I haven't really seen any good answers online yet.
I'm using this, pretty much as given @ this article: Popup window for the GridView[^] (slow traffic there so posting here)
If anyone could provide a corretive assessment(ie: HELP!!!), that'd be great!
My page source looks a bit like this:
<code>
<asp:Content ID="Content1" runat="server"
contentplaceholderid="MainContentPlaceHolder">
<script language="javascript">
var popupWindow
function openPopup(strOpen) {
popupWindow = window.open(strOpen, 'DaaaaName', 'width=500, height=700, top=100, left=300');
if (window.focus) popupWindow.focus();
}
</script>
<asp:GridView......>
.....
< Columns >
......
<asp:TemplateField HeaderText="Rate it?">
< ItemTemplate >
< a href="javascript:openPage('Ratings.aspx?ID=<%# Eval("ID") %>')">Rate it! </a >
< /ItemTemplate>
< /asp:TemplateField>
< /Columns>
......
< /asp:GridView>
< /asp:Content>
</code>
|
|
|
|
|
Hi, make sure after you close your popup you will alwys return a value to your page(gridview).
|
|
|
|
|
Hello,
If you mean I should return true; from my javascript function "openPopup", I've already tried that w/ no effect on the error msg I'm getting about "Object expected"
Thanks
|
|
|
|