|
Hi,
Iam trying to create a datagrid within a datgrid!! The page is of complex design so there are lots of tables... in that i got to have one more datagrid!
I have tried it and bound some data too but i could see the internal datagrid!!
Either i can see the internakl datagrid at the design level!!
Am i missing something??
thanks!
Gautham
|
|
|
|
|
|
only subject is there....whats ur problem...
Describe it more..;P
Dotnet
|
|
|
|
|
Dear All,
My project has this files - Web.config, Global.asax
What are the important in here.
I need get complete idea about content in this file.
Any one can pls give clear idea or submit articles or links.
And also give idea about Forms Authentication / Windows Authentication ?
Regards
Kusal
|
|
|
|
|
|
I want to show the number of rows in a datatable. I'm still a bit new, but thought there would be something similar to Items.Count that returned the total items/rows in the table. I'm looking to do this in C#. thanks!
|
|
|
|
|
This should do it:
DataTable.Rows.Count;
Ben
|
|
|
|
|
Use the datatable.count method. Add it after you filled the datatable.
Dim rwCount as string = DataTableName.Rows.Count.toString()
|
|
|
|
|
Hello all,
I have a gridview and a menu that I can not get to show just white text. I thought I specified the font colors for the column headers of the gridview in my .css file but the default hyperlink colors are taking control instead. Same thing with my menu although I'm not so sure where to change font color for my menu items. I know I'm missing something simple and I really want just what is on the code project's menu with white menu text and I want it to stay white even after the user visits. Any help is greatly appreciated.
menu...
<asp:Menu ID="Menu2" runat="server" DataSourceID="SiteMapDataSource1" Orientation="Horizontal"
DynamicVerticalOffset="2" Height="20"
StaticEnableDefaultPopOutImage="false" StaticItemFormatString="&nbsp {0} &nbsp">
<StaticMenuStyle BorderStyle="None" BackColor="Gray"/>
<StaticMenuItemStyle ForeColor="Black"
BorderColor="#D9D9E6" BorderStyle="Solid" BorderWidth="1px"
Font-Size="10pt" />
<DynamicMenuStyle BorderStyle="Outset" BorderWidth="1px"
BorderColor="White" BackColor="#D9D9E6" />
<DynamicMenuItemStyle Font-Names="Tahoma" Font-Size="8pt"
BorderStyle="Solid" BorderWidth="1px" BorderColor="#D9D9E6" />
<StaticHoverStyle BackColor="Ivory" BorderStyle="Solid" BorderWidth="1px"
BorderColor="#D9D9FF" />
<DynamicHoverStyle BackColor="Ivory" BorderStyle="Solid" BorderWidth="1px"
BorderColor="#D9D9FF" />
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1"
runat="server" ShowStartingNode="false"/>
gridview column header issue...
<asp:GridView ID="GridView1" runat="server" CssClass="DataWebControlStyle" AutoGenerateColumns="True" AllowSorting="true" OnSorting="GridView_Sort" OnSorted="GridView_Sorted">
<HeaderStyle CssClass="HeaderStyle" />
<AlternatingRowStyle CssClass="AlternatingRowStyle" />
</asp:GridView>
.css file
.HeaderStyle
{
background-color: #005eff;
color: White;
font-weight: bold;
}
Darren
|
|
|
|
|
Hi,
One of the solutions that I had used is this..(though there may be others to do the same stuff)
Add the following script to the page where you want the white effect
<%-- <style type="text/css">
<!--
td#MenuTD a:link{color:White;}
td#MenuTD a:visited {color:White;}
-->
</style>--%>
where the MenuTD is the id of the TD which contains the Menu control in the .aspx page. This style only applies to the MenuTD's hyperlinks and not to other hyperlinks on the page.
This effect mainly occurs because when the menu is rendered on screen, then its rendered as a hyperlink (if you see in page's viewsource) and you must be knowing that hyperlinks have by default blue (if not changed in IE).
I think that answers your doubt and problem.
Thanks and best regards
Omkar Ghaisas
|
|
|
|
|
Thanks Omkar! I was missing a:link and a:visited in my style sheet so nothing was happening. Much appreciated.
|
|
|
|
|
Hi..
After I copied some web applications from a computer to another each time I open one of them an error message appear:
The project is on an untrusted web server.Opening this project may cause code to be executed with full trust.Do you want to open this project? yes/no
Then I choose yes and every thing works normally.But why did this message appear?.
Iam using VS 2003 and windows xp professional.
I am too late but i will never give up
|
|
|
|
|
hi guys.. we friends are designin a website tat has a forum.. our prob is tat we need to reciev a mail wenever there's a post made to the website, so that we shd check the post and then put it up only if its legit and neat..
so how do we configure the mail thing in asp.net, C# ? please help me soon peopl..
|
|
|
|
|
When the post is saved in a database run a routine which execute this function, this function must are embebed in the asp.net page, this save the datas in a database, then send then mail to mailing list which contained the admins mails.
Greetings from Mexico
-----------------------
Cuando salga el sol, no estare aqui...
|
|
|
|
|
I would lke to generate an image based from my webpage. Only the top 150 pixels by 40.
Is there a way to take the designated pixels and take a screen shot into an image?
thanks
|
|
|
|
|
Bitmap bmp = new Bitmap(Server.MapPath("web.jpg"));
Graphics g = Graphics.FromImage(bmp);
g.SmoothingMode = SmoothingMode.AntiAlias;
//set Name
g.DrawString(this.txtName.Text,
new Font("Arial", 14), SystemBrushes.WindowText, 110, 10);
//set Title
g.DrawString(this.txtTitle.Text,
new Font("Arial", 8), SystemBrushes.WindowText, 115, 30);
//set Address
g.DrawString(this.txtAddress.Text,
new Font("Arial", 8), SystemBrushes.WindowText, 115, 55);
//set web URl
g.DrawString(this.txtWebURL.Text,
new Font("Arial", 8), SystemBrushes.WindowText, Convert.ToInt16(this.TextBox1.Text), Convert.ToInt16(this.TextBox2.Text));
Response.ContentType = "image/gif";
bmp.Save(Response.OutputStream, ImageFormat.Jpeg);
I figured out how to make this file. How do I make this applicaion download this file instead of displaying it on the screen? Right now it renders the image but when I try to download it windows OS doesnt recognise it as an image.
|
|
|
|
|
I'm still having some issues with sorting a dynamically created Gridview. I have an objectdatasource and a gridview that I set on the fly depending on which report is chosen from a drop down. This is working fine except for when I sort on one report and then try to select another report from the drop down. The GridViewSortEventArgs.SortExpression still holds the value of the previous report's sort column. Is this a futile attemt to change this value? The only place it seems I can clear it is in a custom sort event but that is where I need it. GridView.SortExpression is read only from what I can tell so I don't think I can clear that. Little help?
Darren
|
|
|
|
|
|
hi all,
I am creating image button control dynamically with the appropriate images to its url property.
The problem is i want to identify which image button has been clicked and take appropriate actions according to image clicked. i want to know how to make click event to fire.
if u can provide any exixting code it woud be great for me
i am using asp.net and c#.
i am struck up here,please provide me information on this in detail(if posible along with code)
...
krish
krish
|
|
|
|
|
Register the event dynamically like…
Control.event+=new eventhandler(function);
Thomas
|
|
|
|
|
Hi.
I am trying to set a link conditionally if a piece of data exists.
<code><tr class="bodytext">
<td><a class="grayUrl" href="http://<%#DataBinder.Eval(Container.DataItem, "URL")%>"> <%#DataBinder.Eval(Container.DataItem, "SiteName")%></a>
</td>
</tr></code>
This puts a link on the page... but I only want it there if the database field DataBinder.Eval(Container.DataItem, "Link") is set to true.
I am using .net 2.0 and VB.net
Séan
|
|
|
|
|
Use a server side function to get the URL. Pass the database fields to this function and check there the “Link” is true or false. If the “Link” is true return the concatenated string of “URL” and “Sitename”. If the link is false return the “#”.
Thomas
|
|
|
|
|
Thank you for the answer...
Take it as read that I am a newbie - this code does not work and it is probably because I am doing something wrong:
Dim dbread As OleDbDataReader = dbcomd.ExecuteReader()
Sites.DataSource = dbread
Sites.DataBind()
strNewUrl = check_Review(dbread.GetValue("Review"))
dbread.Close()
dbconn.Close()
End Using
End Sub
Private Function check_Review(ByVal review)
Return ("<%<a class='grayUrl' href='http://<%#DataBinder.Eval(Container.DataItem, 'URL')%>' title='<%#DataBinder.Eval(Container.DataItem, 'SiteName')%>'><%#DataBinder.Eval(Container.DataItem, 'SiteName')%></a>%>")
End Function
End Class
Also - what is the correct method for assigning a new value to the data column as I prepare to write the data to the page? Or am I going about this all wrong?
|
|
|
|
|
Do like this. Don’t copy paste this. Check its integrity
<code><tr class="bodytext">
<td><a class="grayUrl" href='<%# check_Review(DataBinder.Eval(Container.DataItem, "LINK"),DataBinder.Eval(Container.DataItem, "URL"),DataBinder.Eval(Container.DataItem, "SiteName")) %>'</a>
</td>
</tr></code>
code behind....
Private Function check_Review(ByVal link as boolean,ByVal url as string,ByVal sitename as string)
if link then
return "http://" & url & sitename
else
return "#"
end sub
Thomas
|
|
|
|
|
We've just implemented CSS Friendly Control Adapters. We are also using AJAX extensions.
The problem is GridViewAdapter and row's postback. Clicking on a row resuls in "Invalid postback or callback argument. Event validation is enabled using <pages enableeventvalidation="true"> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation." I suspect it’s due to there is no method defined, but I don't have any prove. Before we installed the adapter it worked fine. We were binding some java script on each row. First we thought it was something to to with that. But the error remains even after we disable OnRowDataBound.
Bug? Is there a simple way to solve this?
|
|
|
|