Click here to Skip to main content
16,013,082 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionChanging the location of _viewState in the aspx page Pin
JohnyCoder25-Nov-06 7:04
JohnyCoder25-Nov-06 7:04 
AnswerRe: Changing the location of _viewState in the aspx page Pin
sam L25-Nov-06 20:53
sam L25-Nov-06 20:53 
GeneralRe: Changing the location of _viewState in the aspx page Pin
Fred_Smith25-Nov-06 22:36
Fred_Smith25-Nov-06 22:36 
GeneralRe: Changing the location of _viewState in the aspx page Pin
sam L26-Nov-06 9:09
sam L26-Nov-06 9:09 
GeneralRe: Changing the location of _viewState in the aspx page Pin
JohnyCoder26-Nov-06 5:09
JohnyCoder26-Nov-06 5:09 
GeneralRe: Changing the location of _viewState in the aspx page Pin
sam L26-Nov-06 9:10
sam L26-Nov-06 9:10 
GeneralRe: Changing the location of _viewState in the aspx page Pin
JohnyCoder26-Nov-06 15:22
JohnyCoder26-Nov-06 15:22 
GeneralRe: Changing the location of _viewState in the aspx page Pin
JohnyCoder27-Nov-06 6:22
JohnyCoder27-Nov-06 6:22 
Hello guys.

Here is the code to move _VIEWSTATE hidden field from top of the form to
bottom.drop this code in the basepage and then inherit all the pages from the basepage in ur app.

protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
System.IO.StringWriter stringWriter = new System.IO.StringWriter();
HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);
base.Render(htmlWriter);
string html = stringWriter.ToString();
int StartPoint = html.IndexOf("= 0)
{
int EndPoint = html.IndexOf("/>", StartPoint) + 2;
string viewstateInput = html.Substring(StartPoint, EndPoint - StartPoint);
html = html.Remove(StartPoint, EndPoint - StartPoint);
int FormEndStart = html.IndexOf("") - 1;
if (FormEndStart >= 0)
{
html = html.Insert(FormEndStart, viewstateInput
}
}
writer.Write(html);
}
Thanks sam:
Thank you everyone.

Aamir
QuestionAJAX How to start and where to start Pin
Nitin198125-Nov-06 6:40
Nitin198125-Nov-06 6:40 
AnswerRe: AJAX How to start and where to start Pin
Not Active25-Nov-06 14:23
mentorNot Active25-Nov-06 14:23 
GeneralRe: AJAX How to start and where to start Pin
Fred_Smith25-Nov-06 22:45
Fred_Smith25-Nov-06 22:45 
GeneralRe: AJAX How to start and where to start Pin
Nitin198126-Nov-06 6:37
Nitin198126-Nov-06 6:37 
QuestionSorting columns when displaying single column in datalist Pin
hasanali0025-Nov-06 5:33
hasanali0025-Nov-06 5:33 
QuestionUsing two pages Pin
Khan.Bangash25-Nov-06 1:52
Khan.Bangash25-Nov-06 1:52 
AnswerRe: Using two pages Pin
iamrashida8325-Nov-06 4:55
iamrashida8325-Nov-06 4:55 
GeneralRe: Using two pages Pin
Not Active25-Nov-06 14:20
mentorNot Active25-Nov-06 14:20 
Questionexpand Tree view Pin
Imran Khan Pathan25-Nov-06 1:13
Imran Khan Pathan25-Nov-06 1:13 
AnswerRe: expand Tree view Pin
iamrashida8325-Nov-06 5:04
iamrashida8325-Nov-06 5:04 
AnswerRe: expand Tree view Pin
Not Active25-Nov-06 14:18
mentorNot Active25-Nov-06 14:18 
QuestionUsing server.mappath in classes (or not) Pin
Fred_Smith25-Nov-06 0:22
Fred_Smith25-Nov-06 0:22 
AnswerRe: Using server.mappath in classes (or not) Pin
iamrashida8325-Nov-06 5:06
iamrashida8325-Nov-06 5:06 
GeneralRe: Using server.mappath in classes (or not) Pin
Fred_Smith25-Nov-06 5:14
Fred_Smith25-Nov-06 5:14 
GeneralRe: Using server.mappath in classes (or not) Pin
iamrashida8325-Nov-06 5:37
iamrashida8325-Nov-06 5:37 
GeneralRe: Using server.mappath in classes (or not) Pin
Fred_Smith25-Nov-06 5:49
Fred_Smith25-Nov-06 5:49 
QuestionHow to get the india time zone with asp Pin
kumar.a24-Nov-06 23:45
kumar.a24-Nov-06 23:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.