|
Hi great minds,
A asp.net app that make use of Anthem ajax-enabled controls, and some javascript as well, has suddenly stopped working. Ajax controls no longer issue their requests and on top of this, javascripts no longer work.
Javascript stopped working first and a day or two later the anthem controls. We get no compliler errors or whatsoever. I thought the IDE got broken because a previous OPERATIONAL version works on another computer, but not in one I am using. I have re-installed VS2005 but it still does not work.
Would this be due to one of those windows updates? any sugestions?
thank you so much for your time and help.
Joe.
|
|
|
|
|
Hi ,
I want to place text box in grid view so that i can edit from grid view itself and also want to perform validation
can any one suggest me some link
Thanks and regards,
Amit Patel
|
|
|
|
|
See,
You can use TextBox in Gridview using Template Field .
Ref: Template Field in Gridview[^]
Amit Patel1985 wrote: i can edit from grid view itself
Grid View having inbuilt features of Edit. You need to enable the Edit Mode of Gridview and Handel the RowEditing events.
Ref : GridView Row Edit[^]
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Dear All,
I have a case that I will need to retrive a webusercontrol XHTML from database and inject it in a web page at runtime the issue is that I don't find an Xhtmlreader class in c#, I understand that XHTML code in asp.net will need to be transformed to html before it can be rendered to a web browser and that might be the reason for not having such class in c#. another question is that is there a way to implement MVVM design pattern in asp.net. I've searched for that in google and found a demo or what they called ASP.Net MVVM Framework in codeplexi but it looks more like they use MVP Pattern becuase there is a behind code for the Webusercontrols they use, in other words I need to have the whole functionality and binding features of an asp.net webusercontrol with a gridview or formview without need to write behind code.
Many Thanks and best regards
Hassan Ali
Hassan Amaar
|
|
|
|
|
i am using file upload component. in this component can we upload particular filename like "doc" and all other files cannot be uploaded.
|
|
|
|
|
Like this[^].
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
|
Read listing three in that page. It shows how to restrict the user to uload only a certian file types. Ofcourse the regular expression that they have used needs a change in your case. But it it mere customization and should not be a problem.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
|
Hi,
I am working on a Asp.net project. Here we need to display a URL in a new browser window with custom size like a popup. For this I tried with below code:
Page.RegisterStartupScript("New Window", "<script language=JavaScript>window.open('Default.aspx','mywindow','width=500,height=300');</script>");
This is working in all the my project pages. But this is not working in one of my project page where I used Ajax extenders like calender extender, Auto complete extender etc. So I also tried with
ClientScript.RegisterClientScript()
but eventhen it is not working.
If anyone have any idea to solve this please reply me.
Thanks in advance.
|
|
|
|
|
Can you please tell us what error you are getting?
If no error, then have you checked what it appears in View-Source in Browser?
Also check if popup is blocked in your browser for that site.
|
|
|
|
|
Instead of
ClientScript.RegisterClientScript() use ScriptManager.RegisterStartupScript() when the call is inside UpdatePanel .
|
|
|
|
|
Hi all
I found a problem when I use repeater control.I use a Image button and store image id in Tool Tip of Image button but i unable to get the tool tip value in a another text box which is outside of repeater on my form.
for more details- I use modelpopup ajax control inside it i take update Panel in updatepanel i use repeater and in repeater i take ImageButton.
Any help would be appreciateable
I know its a bit hectic but developer is a person who overcomes it.
|
|
|
|
|
First of all,
You might have used ItemDataBound to set the value of TextBox. Also to remind, if you are using a Repeater, and the imagebutton is inside the ItemTemplate, you are having more than one ImageButton while there will be only on textbox which is placed outside the textbox.
If you want the text to appear whenever you click on the ImageButton, there is also a problem. You said, you have placed the Repeater inside an undatepanel while the textbox is outside it. In case of UpdatePanel, a separate form is created in the client and posted to the server as request with only those controls which are inside the UpdatePanel. Thus in server side, if you set the value of the Textbox, it will not be transferred to the client and therefore will not update the control in the client.
So Rather than updating the server side object, you can either place the textbox inside the update panel or you inject some javascript which will update the value of the textbox upon receiving the response to the client.
I am talking about
ScriptManager1.RegisterStartupScript()
I hope you got the idea.
Cheers.
|
|
|
|
|
Hi
I am using gridview in one page and wanted to do some calculation, for this i wanted to pass textbox values to javascript, kindly help me if anyone knows how to pass gridview textbox value to java script.
Thanks in advance
|
|
|
|
|
You can access the grid view's text boxes from javascript by using the controls client id. it will generally be in the patter gridid$controlid$slno. You can get this by viewing the client HTML source on the browser.
|
|
|
|
|
is it possible for you to show in example??
|
|
|
|
|
I don't have access to VS 2005 or greater at work so here is a sample with VS 2003/ASP.NET 1.x -
For this datagrid
<asp:DataGrid id="DataGrid1" style="Z-INDEX: 102; LEFT: 208px; POSITION: absolute; TOP: 160px"
runat="server" AutoGenerateColumns="False">
<Columns>
<asp:TemplateColumn HeaderText="sd" FooterText="as">
<ItemTemplate>
<asp:TextBox ID="abc" Runat="server" Text="asd"></asp:TextBox>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
and this code
DataTable asd = new DataTable("asd");
asd.Columns.Add("asd");
DataRow dr = asd.NewRow();
DataRow dr1 = asd.NewRow();
dr[0]=asd;
dr1[0]=asd;
asd.Rows.Add(dr);
asd.Rows.Add(dr1);
DataGrid1.DataSource= asd;
DataGrid1.DataBind();
the client ids for the 2 text boxes generated would be DataGrid1__ctl2_abc and DataGrid1__ctl3_abc
You can use this id in the getElementById method in javascript to access the data.
NOTE - Client id generated in higher version of ASP.NET will be similar but not exactly the same.
|
|
|
|
|
I have made a web form in which I have taken the following components:
two labels: lbHeading and lbDescription
two textBoxes: txtHeading and txtDesc
two buttons: btnAddArticle and btnCancel
one GridView: GridView1
When I'm adding some article, it is saved in the table "tbArticle" and show both the contents(i.e. heading and article description) in the grid view using SQlDataAdapter.
But when I refresh the page, it's adding the article twice in the table and then showing twice... When again I refresh the page, it again adds the entry even without clicking the "add button"...
what could be the error ?
plz try to fix it
One thing I want to tell you is that adding the entry of articles is done in the "add" button click event.
|
|
|
|
|
When you press refresh, the browser posts the last action to the server again, in this case, the last action u did was the add button click. Hence the server exec the add button click event which posts another copy to the database. This is default browser behavior.
To prevent this you can do either of the following -
* Place a refresh button and on the click event refresh the datagrid only.
OR
* After the Add click event is completed, register an client script to refresh the url, which would reset the last action. Use the window.location.href to set the url to the same page.
HTH
|
|
|
|
|
I have set the code-behind method ..So, I can't use window.location.href.or any client scripting of .cs
could u tell me how to use the first method i.e. placing the refresh button and so on...
|
|
|
|
|
|
Its not that you cannot do it. All that you need to do is at the end of the event add a line, depending on the version of ASP.NET you are using.
Page.RegisterStartupScript("New Window", "<script language=JavaScript>window.location.href='your url';</script>");
or
ClientScript.RegisterStartupScript(..., "<script language=JavaScript>window.location.href='your url';</script>")
I don't exactly remember the syntax for ClientScript object.
Now, to do the first method -
Put a button near the grid and on the server click event call the method to load the datasource and bind it to the datagrid.
Drawbacks of this approach -
* The re-submit would happen if the user hits the browser's refresh button right after clicking the add button.
|
|
|
|
|
Hi all,
My gridview was populated by some records and i have provided page size of 10. When i do the paging the it reload the whole page but i want it show load only that specific portion of the page instead of loading whole page. how can i do that? Can i do this using Ajax?
Thanks
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
rahul.net11 wrote: Can i do this using Ajax?
Yes, use UpdatePanel[^].
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|