|
hi,
we developed two forms.asp x with Dynamic Controls,First form has one Dynamic button_Open ,this button has Click event ,through button_Open_Click event we need to open second form with dynamic controls through
(window.open()),window opening but forms.asp x not displaying controls and Second form overwriting on first form ,we added code for Dynamic Controls in both pages Page_PreInit event.Please suggest me to do the better way to maintain state of control both pages.
|
|
|
|
|
Can you elaborate your question along with some sample code
|
|
|
|
|
hi,
we are creating dynamic controls (Button,Text Box,etc..)on form, we write code for dynamic Controls in Page_preInit event and this form has all dynamic controls .
in Dyanamic Button Click event we need to open new window with dynamic controls.it is opening same window not in another popup window.
Button_Click Event code below
string scriptOne = "";
scriptOne += "var w = 700;";
scriptOne += "var h = 300;";
scriptOne += "var left = (screen.width/2)-(w/2);";
scriptOne += "var top = (screen.height/2)-(h/2);";
scriptOne += "window.open('DynamicSearchControl.aspx','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);";
this.Page.ClientScript.RegisterStartupScript(this.GetType(),"Privilge", scriptOne,true);
|
|
|
|
|
hi,
My problem Solved ,so don't waste your time on my issue.
|
|
|
|
|
Hi,
i am upload document in particular folder.
this folder only access admin only.
so i want make protect that folder.
How will give folder permission in runtime.
please give me ur valuable feedback..
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
|
|
|
|
|
|
Can anyone tell me how to apply Page_Error in ASP.NET?
I have written the following code in some.aspx.cs file.
protected void Button1_Click(object sender, EventArgs e)
{
int[] a=new int[5];
a[5] = 0;
}
public void Page_Error(object sender, EventArgs e)
{
Response.Write("Error occured...");
}
Where I am making mistake? Please help....
NEHA GUPTA
|
|
|
|
|
Ok you implemented the page error event to write a string to output stream. It will fire whenever the page encounter an error. So what is your problem? What you want to attain?
|
|
|
|
|
I am getting an exception instead of getting response on the web page.
NEHA GUPTA
|
|
|
|
|
Then you have to call Server.ClearError to prevent further error processing.
|
|
|
|
|
As said by you, I applied Server.ClearError() in Page_Error event but still same output.
NEHA GUPTA
|
|
|
|
|
|
I had created a rdlc in asp .net web application.But I have a problem.
I have also created dataset for that.In my rdlc,employeeid,employee name,department,designation,date of works,time in,time out and working hours are there.In my procedure,there are four parameters are passed.Parameters are employee id,from date,to date,dept id,designation id.Problem is that I will have to get my report as employee id,employee name,department,today's date as a group..
eg:
Company ID :ms4455
Employee Name :thanu
Department :development
Date :17/07/2010
time in ,time out and working hours will be as a report.Please help me to grouping this.Please give me a suggestion.I have to use sub report or not.
|
|
|
|
|
Hi,
you dont have to use subreports. Use a table within your rdlc and link that
tables datasource to the datasource containg your working hours.
Consider using seperate generic lists as datasources, which you add to your
report file one by one. This makes it very easy to choose the correct datasource
within your rdlc elements.
|
|
|
|
|
I have a page call Sample.aspx. I am using a Control (which have some textbox, radio buttonlist, etc) in it. and depending on no. of items that control got created repeatedly. on Sample.aspx, i have to find out its values for respective items.
How to achieve it ?
Kindly guide me a bit.
Thanks
|
|
|
|
|
Can you elaborate more on your question with
some sample code or illustration?
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
look, the scene is like, i m ordering an item list and i have to enter a quantity n all details for a specific item. For that i have created a control, which is get called on number of items, like if there are three items, then three times control get called and showing three interfaces for input. On save button click, i want to save respected data to their respective items, how to achieve it.
|
|
|
|
|
|
I have 5 drop-downs in user control. I need to display them in another user control button click event using
JavaScript.
|
|
|
|
|
Can you elaborate your question along with
some sample code, so that it is clear and easy
to understand?
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
If it weren't javascript that would be much better. Are the user controls nested (is one inside the other) or are they just on the same page? Regardless, if it weren't for the unfortunate javascript requirement I would say the user control with the button needs to fire an event that either the page or the parent control listens for. Then in the handler for that even tell the control with the dropdowns to do whatever it is it needs to do.
Now if you put both user controls in the same update panel all this would work without reloading the page and it would look and act the same from the user's perspective as it would had you done it with JavaScript.
Event Bubbling From Web User Controls in ASP.NET (C#) [^]
|
|
|
|
|
Hello every1,
I have installed VS208. I have tried to work with Entity framework. before, I start have some questions:
1) where is the Entity framework; because I haven't seen it. Do I have to install it? where? do you have any link?
2)how do I have to use it?can I use it in MVC. how?
|
|
|
|
|
|
hi every one,
can anyone tell me how to do paging for gridView in asp.net without using the sqlDataSource control, on clicking next it has to show the next page, on clicking prev it has to show the previous page in the gridView control. just like the operation we get in sqlDataSource control.
i'm fresher pls explain in detail. any links also will help me great..
thanks in advance
dittu 
|
|
|
|
|
Try following code.
protected void gvPaging_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
gvPaging.PageIndex = e.NewPageIndex;
gvPaging.DataBind();
}
protected void gvSorting_Sorting(object sender, GridViewSortEventArgs e)
{
DataTable dtSortTable = gvSorting.DataSource as DataTable;
if (dtSortTable != null)
{
DataView dvSortedView = new DataView(dtSortTable);
dvSortedView.Sort = e.SortExpression + " " + getSortDirectionString(e.SortDirection);
gvSorting.DataSource = dvSortedView;
gvSorting.DataBind();
}
}
private string getSortDirectionString(SortDirection sortDireciton)
{
string newSortDirection = String.Empty;
if(sortDirection== SortDirection.Ascending)
{
newSortDirection = "ASC";
}
else
{
newSortDirection = "DESC";
}
return newSortDirection
}
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|