|
Hi,
Even though ViewState information is stored in a hidden field (__VIEWSTATE) in the page, you need to remember that the information is in encrypted state. Also the information is page specific, so if you try to access some other page's ViewState information in some other page only, then you won't be able to retrieve any value.
"On all page visits, during the save view state stage the Page class gathers the collective view state for all of the controls in its control hierarchy and serializes the state to a base-64 encoded string. (This is the string that is emitted in the hidden __VIEWSTATE form field.) Similarly, on postbacks, the load view state stage needs to deserialize the persisted view state data, and update the pertinent controls in the control hierarchy."
I hope that answers your nice question
Thanks and best regards
Omkar Ghaisas
|
|
|
|
|
ViewState is for a single page.
|
|
|
|
|
Hi,
I'm using RadioButtons in datagrid But When I select one I can't unselect it and when I select the others they cannot unselect the other instead they are selected all at once. how could I go about this to be able select one at a time. these Radio button are in one column.
Thanks.
|
|
|
|
|
Try using the name property of the radio btn or radiolist button!!
Gautham
|
|
|
|
|
Thanks Gautham
I'm having another problem. My dataGrid has three different columns. two of them are supposed to be for inserting data and before I inserted the radiobuttonlist it was inserting data very well but after inserting the radiobuttonlist my datagrid cannot insert data any more why isit so? To insert I was using The edit,Update and delete column.
Thanks.
|
|
|
|
|
I have a web user control that is dynamically added to a placeholder on my aspx page.
My user control has a gridview.
I have written code that binds the gridview to a database when the "control" is loaded.
The load event gets fired when the user control is loaded but the gridview doesnt get bound to the database
Please help its urgent
-- modified at 2:17 Friday 2nd March, 2007
Regards
|
|
|
|
|
|
Hi All,
I am facing some problem in GridView Paging. Below is the code, I have written in my code behind. (ASP.NET 2.0 and VB.NET)
I have set the 'AllowPaging' property of Gridview to true. Pagers are Displayed at the bottom. But when I am trying to navigate between the pages, Paging in not working. Only the First Page is always Displayed.
How can I solve this? pls guide me. Thanks
Dim ds As DataSet
Protected Sub displayData()
'Dataset if Poulated
gridView.DataSource=ds.Tables(0)
gridView.DataBind()
End Sub
Protected Sub gridView_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gvChangeStatus.PageIndexChanging
gridView.PageIndex = e.NewPageIndex
End Sub
Regards,
Jay
|
|
|
|
|
Hi,
Inside the Protected Sub gridView_PageIndexChanging, alongwith setting the newpageindex, you will also need to bind the grid again.. because thats the step where each and every row of the grid gets bound with new data.
Thanks and best regards
Omkar Ghaisas
|
|
|
|
|
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.
|
|
|
|