|
You can use JavaScript or a CustomValidator. Which method do you want?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i will try with custom validator. thanks .
suchita
|
|
|
|
|
I use the custom validator and created one dll file and well that worked.
Thanks once again.
suchita
|
|
|
|
|
You're welcome
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hi
How to call and pass values to Javascript function when i load a gridview in server side.
|
|
|
|
|
Ask a sensible question adn you might get a sensible answer - but I suspect you need to be looking at the RowDataBound event and adding your JS calls there
|
|
|
|
|
Hi friends,
i Initially developed a webapplication on .Netframework 2.0,
now i am migrating to .Netframe work 3.5.
In this process i got some errors, and i able to solve them by change Configaration settings in web.config file.
Now Collapsable panel is not working(Not Expanding and colapsing when i click on Header panel).
Some Changes i mader earlier in my application to avoid problems.
1. I Changed the <asp:scriptmanager id="ScriptManager1" runat="server">;
<asp:scriptmanager>>; --> Ajaxtoolkit manager.
Thanks in advance.
With Regards
Raveendra.jonna
|
|
|
|
|
Did you completely replace your configuration file or did you just modify it? If in your changes you removed the references to System.Web.Extensions that could certainly mess things up. Not sure what you mean with the ScriptManager change. Every page that uses the toolkit has to have a script manager, but to be safe I would recommend using the ToolkitScriptManager control rather than a ScriptManager control. A lot could also depend on the version of the toolkit you are using. I have found that some of the more recent versions are very buggy and have had to roll back to 3.0.30512.1.
|
|
|
|
|
Thanks for Reply!!
I just modified the Web.Config file. (did n't Replace).
with ScriptManager Application is not running , So I Replaced "ScriptManager"
with the "ToolkitScriptManager" that thing only i mensioned in Problem, with "ToolkitScriptManager"
Calenderextender , Updateprogress is working and i am getting problem with the collapsible panel.
i Have n't understand the
" If in your changes you removed the references to System.Web.Extensions that could certainly mess things up"
1. in Solution exploree i did n't remove the System.web.extensions dll.
2. In Web.config files i did n't remove the Reference to system.web.extensions
<compilation defaultlanguage="c#" debug="true">
<assemblies>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A">
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089">
Any how i am facing this problem when migrating to .Net Framework 3.5 from .Net framework2.0,
i Tried it on New Application (.NetFramework 3.5 and Visual studion 2008) there also Collapsable panel not working
(in Newapplication also "ScriptManager" is not working, with ToolkitScriptManager i am getting same problem regarding collapsible panel)
Please suggest Solution.
Thanks in Advance.
|
|
|
|
|
Check the version of the System.Web.Extensions in the web.config. Just because it's there doesn't mean its the correct version, especially if you're upgrading and application
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks for reply
Can you specify
Which tags i need to check in web.config file
and which version i need to mention.
Any suggestions would be appreciated
modified on Saturday, November 20, 2010 5:17 AM
|
|
|
|
|
hi all,
i have built a webapplication using VS08 and IIS 5.1
then i published it to IIS but now i have noticed that the images the application has are not visible.
also the Javascript that i have added are not being added.
this was not the case when i was developing the application.
i was sure that i was path problem but i changed it <img alt="Loading" src="images/progress.gif" />
still the image is not being shown.
also if i try to browse the path http://localhost/MyApplication/images/progress.gif then i see this message
You are not authorized to view this page
can some one guide me on this.
Thanks
Sandeep
|
|
|
|
|
Check whether images folder is copied properly and whether the images are referenced properly.
Check whether any heavy resource activities are happening on server.
You can uncheck directory browing option on iis and browse the image..
Hope this will help u..
No Defeat Is Final Until You Stop Trying!.......
|
|
|
|
|
hi Surender,
Thanks for reply
well for ur questions
Check whether images folder is copied properly and whether the images are referenced properly. Checked and is there
Check whether any heavy resource activities are happening on server. NO
You can uncheck directory browing option on iis and browse the image.. even if i check or uncheck that checkbox it is not being visible
By default when u make virtual directory it has anonymous access to the application and directory browsing is turned off.
only when i published the application inside the www root of the IIS then the application worked correctly.
initially the application was posted on other folder other than the WWW root of the IIS.
i m sure it has something to do with the path outside the home directory of the IIS but wht it is im not sure of.
there is no probs with the path of Images as the same application is running well whn is hosted in WWW root
ne help will be appreciated
Thanks & regards
Sandeep
|
|
|
|
|
Try giving everyone full permission to that folder read + write. Check your browser settings if javascript is off and images off
|
|
|
|
|
Hi,
I am using repeater and i am pulling data from the datatable which itself is pulling data from the string arrays. My datatable and the repeater code is like this:
DataTable dt = new DataTable();
dt.Columns.Add("ID");
dt.Columns.Add("Name");
dt.Columns.Add("Year");
and the repeater code is like this:
DataView dv = dt.DefaultView;
rpt1.DataSource = dv;
rpt1.DataBind();
where rpt1 denotes repeater.
The ascx code for repeater is like this:
<asp:Repeater ID = "rpt1" runat="server"
onitemdatabound="rpt1_ItemDataBound"
onitemcommand="rpt1_ItemCommand" >
<ItemTemplate>
<asp:Label ID = "lbl_Year" runat="server" Text='<%# Eval("Year") %>'/></li>
<asp:Label ID = "lbl_Name" runat="server" Text='<%# Eval("Name") %>'/>
<asp:Label ID = "lbl_ID" runat="server" Text='<%# Eval("ID") %>' />
</ItemTemplate>
</asp:Repeater>
There is no problem in the output. It is showing data. But Now I want these data based on the Year. Like "Year" as a title and under that Name and ID should display. Any ideas??
suchita
|
|
|
|
|
Not exactly sure what you want but if you want to show the name and id labels below the year then use the br tag not li.
If you want year to be an expandable section then you have a bit more work.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
No not that kind. Well there are Year data like "2007", "2008","2009","2010" and the Name and ID are unique. So I want to show some think like this:
My datatable has data like this:
Year Name ID
2007 Architecture arc1
2008 Architecture arc2
2009 Architecture arc3
2010 Architecture arc2
2007 Engineering eng1
2008 Engineering eng2
2008 science sci2
2009 science sci3
2010 Engineering eng4
2010 science sci4
And i wanted to show like the one shown below:
2007
Architecture arc1
Engineering eng1
2008
Architecture arc2
Engineering eng2
science sci2
2009
science sci3
2010
Architecture arc4
Engineering eng4
science sci4
suchita
|
|
|
|
|
|
Hi Mark,
I got problems when using nested repeater. Well if i dont use nested repeater, the parent repeater is getting data from the datatable but when i use nested repeater under that parent repeater, data count in parent repeater is showing zero for the same user. i even break point in all the steps and the datacount is zero when i use the nested repeater. I dont know why is that happening ..
suchita
|
|
|
|
|
Without seeing what you are doing how can anyone possibly answer? The repeater doesn't change your data.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Ok. Let me show whatever I did so far.
I am using repeater and i am pulling data from the datatable which itself is pulling data from the string arrays. My datatable and the repeater code is like this:
DataTable dt = new DataTable();
dt.Columns.Add("ID");
dt.Columns.Add("Name");
dt.Columns.Add("Year");
foreach (string se in sec)
{
DataRow dr = dt.NewRow();
Name[] sf = Name.FindByID(se.ID);
dr["ID"] = se.ID;
dr["Name"] = se.Name;
dr["Year"] = se.Term;
dt.Rows.Add(dr);
}
and the repeater code is like this:
DataView dv = dt.DefaultView;
rptParent.DataSource = dv;
rptParent.DataBind();
where rptParent denotes repeater.
The ascx code for repeater is like this:
<asp:Repeater ID = "rptParent" runat="server"
onitemdatabound="rptParent_ItemDataBound"
onitemcommand="rptParent_ItemCommand" >
<ItemTemplate>
<li>
<asp:Label ID = "lbl_Year" runat="server" Text='<%# Eval("Year") %>'/>
</li>
<asp:Repeater ID = "rptChild" runat="server" >
<ItemTemplate>
<ul>
<li>
<asp:LinkButton ID ="lnk_Name" runat="server" Text='<%# Eval("Name") %>' CommandName = "GoToPage" CommandArgument ='<%# Eval("ID") %>'/>
</li>
</ul>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
And corresponding databound code is:
protected void rptParent_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
RepeaterItem item = e.Item;
rptChild = (Repeater)item.FindControl("rptChild");
DataRowView drv = (DataRowView)item.DataItem;
rptChild.DataSource = drv.CreateChildView("rptParent");
rptChild.DataBind();
}
Now when i don't use rptChild repeater, all the data is showing . No problem with that. But when I use rptChild repeater as shown in above codes, data is not showing. I tried it using breakpoint too. No error but it is not showing any data count in rptParent repeater.I tried this using
rptParent.Items.Count .
The count is 4 when i run the program without child repeater but it is 0 when i run the program with the child repeater. Can you tell me why this happens and how can I get out of this error ?
suchita
modified on Friday, November 19, 2010 9:23 AM
|
|
|
|
|
Hey,
I found the error.
when i the cursor comes to this code
rptChild.DataSource = drv.CreateChildView("rptParent");
it throws the exception.
It said "The relation is not parented to the table to which the Dataview points" .
But what can be done in this case ? Any ideas ??
suchita
|
|
|
|
|
It helps quite a lot when you learn to use the debugger.
The exception is very obvious, you have not create a relationship. How does the framework know the data in a DataTable has any relationhip unless you tell it. Software development isn't magic.
http://msdn.microsoft.com/en-us/library/0k21zcyx(v=VS.100).aspx[^]
Reading the documentation and understanding the tools you are working will help great deal.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I got it working now. My problem is solved. Thank you Mark.
suchita
|
|
|
|