|
Amandeep, You have asked me one question on Remote IIS Debugging, Here is your complete Answer.
|
|
|
|
|
Hi All
How I can get the selected node of a treeview.
After That I want to get Value property and Text Property of
Selected node.
The javascript function that I have developed is not working
In this fuction I am trying to get Treeview (TVSectionContentsList). Then its selected node and after that its value and text property.
Please Help me in this matter.
function insertValue() {
FTB_API['<%=FreeTextBox1.ClientID%>'].Focus();
var tv = document.getElementById('<%=
TVSectionContentsList.ClientID%>');
var treeNode = GetSelectedNodeEntity();
var treeNode = tv.getTreeNode(tv.selectedNodeIndex);
var val = treeNode.value;
var txt = treeNode.text;
FTB_API['<%=FreeTextBox1.ClientID%>'].InsertHtml('<span id=' + val + '>' + txt + '</span>');
window.event.returnValue = false;
FTB_API['<%=FreeTextBox1.ClientID%>'].Focus();
}
|
|
|
|
|
Hi to all,
I want to display description like maximum 20 characters in grid column.....i have already used
boundfield of grid to display the field Description.....
i have tried to do it by Itemstyle but its not working....
can any one tell me the soluntion for that........
|
|
|
|
|
Can you show me Binding code?
|
|
|
|
|
ya sure.........this is the code....
<asp:GridView ID="gvMenuCategory" runat="server" AutoGenerateColumns="False" AllowPaging="true"
AllowSorting="true" PageSize="3" CssClass="datatable"
OnPageIndexChanging="gvMenuCategory_PageIndexChanging"
onrowdatabound="gvMenuCategory_RowDataBound">
<HeaderStyle HorizontalAlign="Left" CssClass="head" />
<Columns>
<asp:BoundField HeaderText="Name" DataField="Name" ItemStyle-Width="30%" />
<asp:BoundField HeaderText="Description" ItemStyle-Width="60%" ItemStyle-Wrap="true"
DataField="Description" />
<asp:HyperLinkField Text="Edit" DataNavigateUrlFormatString="/Menu/MenuCategory.aspx?Restaurant&MenuCategoryID={0}"
DataNavigateUrlFields="MenuCategoryID" HeaderText="Edit"></asp:HyperLinkField>
</Columns>
<HeaderStyle BackColor="#6B696B" ForeColor="White" />
</asp:GridView>
hope u will get idea by this..............
|
|
|
|
|
use the itemtemplate instead of BoundField
like this one
<Columns>
<asp:BoundField HeaderText="Name" DataField="Name" ItemStyle-Width="30%" />
<asp:TemplateField >
<ItemTemplate>
<asp:Label id="lblDescription" Text='<%# Eval("Description") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField Text="Edit" DataNavigateUrlFormatString="/Menu/MenuCategory.aspx?Restaurant&MenuCategoryID={0}"
DataNavigateUrlFields="MenuCategoryID" HeaderText="Edit"></asp:HyperLinkField>
</Columns>
Then use the RowDataBound event of your gridview
and code the following
protected void gvMenuCategory_RowDataBound(object sender, GridViewRowEventArgs e)
{
string fulldesc="";
if(e.Row.RowType==DataControlRowType.DataRow)
{
DataRowView dr= (DataRowView)e.Row.DataItem;
fulldesc=dr["Description"].ToString();
Label lbldesc = (Label)e.Row.FindControl("lblDescription");
lbldesc.Text = fulldesc.Substring(0, 19);
}
}
Hope this work for you
|
|
|
|
|
thanx for this code.............but before also i have already used that DataRowView but it gives error like
"Unable to cast object of type 'repository of my project' to type 'System.Data.DataRowView'."
though i tried your code but it gives still the same error.........
if u have another solution then please tell me...........i m trying to solve it from 2 days......
thanx
|
|
|
|
|
Send me your HTML, Code behind and also send complete exception that the page is throwing.
|
|
|
|
|
Thanx for yr precious time......but i got the solution of my problem now........
i need to write just 1 line code........in Boundfield of description in grid.........
again very much thanx for showing interest on my Problem........
|
|
|
|
|
and ya if u can help for another problem .........
the problem is i want to bind the static dropdownlist in Grid...
like........in design aspx page.....code is like...
<asp:DropDownList ID="ddlStatus" CssClass="Dropdown" runat="server">
<asp:ListItem Text="Available" Value="1"></asp:ListItem>
<asp:ListItem Text="Seasonal" Value="2"></asp:ListItem>
<asp:ListItem Text="Closed" Value="3"></asp:ListItem>
</asp:DropDownList>
now i wan to display text item in the grid that is "Available","Seasonal","Closed"...
how can i display that item in grid......
if u know then give the solution...it will be helpful to me.........
|
|
|
|
|
and ya the status is integer in the database.....ok
so i have that kind of problem.........otherwise it will be done by this...
ddlStatus.selecteditem.text right?
|
|
|
|
|
Hi Guys,
I am using MasterPage in VisualStudio2008.
Master page and content pages are working fine.
There are one problem is on header of Masterpage.
There are 5 flash buttons. Like HOME, PRODUCTS, DOWNLOADS etc...
When I am on home page this Flash Button [HOME] color is changing but when I am clicking PRODUCTS or any other flash button then this PRODUCTS button color is not changing its still changing HOME button color.
Page is redirecting but header buttons color is not changing.
Please let me know where I am wrong.
Thanks
|
|
|
|
|
Sr...Frank wrote: Please let me know where I am wrong.
Cant really say without looking athe code.
But if you ask me to make a wid guess than I would say that the events (probably mouse over?) on other buttons are also targeting home button.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Sr...Frank wrote: Flash Button
Does all the Flash button behavior are same?
Sr...Frank wrote: I am clicking PRODUCTS or any other flash button then this PRODUCTS button color is not changing its still changing HOME button color.
I guess it may be causes problem with Flash Button.
|
|
|
|
|
Yes
|
|
|
|
|
I set up ImageUrl in design time to some image in the App_Data and it is visible in the Design tab in .aspx file.
But as I start the project with F5 to debug, the image is not visible.
Also the other images file paths I set to ImageUrl property are not visible at run time.
What is wrong with Image control?
Чесноков
|
|
|
|
|
Chesnokov Yuriy wrote: What is wrong with Image control?
Nothing Wrong with it
You are putting Images in wrong folder. App_Data is not used for that. Use Separeate Folder (Create Images) and put the images on that folder and Try to access from there.
Thanks.
|
|
|
|
|
Why is it not suitable for images? Are there some standard folders for that purpouse?
There are:
App_Code
App_GlobalResources
App_LocalResources
App_WebReferences
App_Data
App_Browsers
App_Themes
From the coding standards point of view, which one is the right?
Actually I put all images into App_Data\Images and then just switch ImageUrl to any of them. But they do not appear at run-time.
Are these folders some kind of forbidden ones to access from web page by means of web controls?
Чесноков
|
|
|
|
|
Chesnokov Yuriy wrote: App_Data\Images
App_Data is used to access the SQL database(or Access if you like more pain ).
You should rather create a new folder, lets say Images and put your image file these.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I did and it worked, but what is the reason to avoid App_* folders?
Чесноков
|
|
|
|
|
Chesnokov Yuriy wrote: but what is the reason to avoid App_* folders?
I hope your got the answer
|
|
|
|
|
|
That's one is great, I've just started with ASP.NET and it will help me a lot. Thanks!!!
Чесноков
|
|
|
|
|
hi ,
In login form i used
FormsAuthentication.Initialize();
FormsAuthenticationTicket ObjTicket = new FormsAuthenticationTicket(1, txtLoginId.Text, DateTime.Now, DateTime.Now.AddMinutes(30), false, txtLoginId.Text + "," + txtPassword.Text, FormsAuthentication.FormsCookiePath);
Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(ObjTicket)));
Response.Redirect(FormsAuthentication.GetRedirectUrl(txtLoginId.Text, false));
Now i want to get login id (txtLoginId.Text) in any other form.........
how is it possible?
thanks
|
|
|
|
|
zeeShan anSari wrote: Now i want to get login id (txtLoginId.Text) in any other form.........
Why not putting it into session ?
Set Session Like :
Session["LoginID"]= txtLoginId.Text
Retrieve it in different form
string strLoginID=Session["LoginID"].ToString();
Hope this will help you
|
|
|
|