|
If you want partial update then ASP.NET Ajax Update Panel and Ajax Timer are the best choice (in my opinion ).
other way might be auto-refreshing the whole page by using meta tag. actually, it's very old way.. so, I think the way you are using is good.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hi All,
I am creating dynamic row when the user wants to add more info into the grid view.
I have set my last column in the grid view with Update, Cancel button.
I have added click event to the button. But still it is not hitting the click event method.
I am new bee for ASP.NET. Tell me If i have done something wrong.
cell = new TableCell();
Button link1 = new Button();
link1.Text = "Update";
link1.ID = "btnUpdate";
link1.Click += new System.EventHandler(btnUpdate_Click);
link1.ID = "btnUpdate";
cell.Controls.Add(link1);
link1 = new Button();
link1.Text = "Cancel";
link1.Click += new System.EventHandler(OnCancelClicked);
cell.Controls.Add(link1);
-- modified at 14:54 Tuesday 21st August, 2007
|
|
|
|
|
atimpoo wrote: I have added click event to the button. But still it is not hitting the click event method.
I don't think that click event of button within GridView will be invoked. maybe. you should set the commandname for that button. and if you click that button, the itemcommand event of GridView will be fired. get the commandname to know which button you clicked if you have more than one button..
Normally, you should create Template Column in GridView. Put the button in the template column of GridView. then, you have to set the CommandName (let's say "mycmd") in button. If you click this button, the itemcommand event of GridView will be fired. then, check the command name to know which button has been clicked.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Hello everybody...
In my Grid View I have 3 parameters:
1- IPAddressID (primary key) int not mull (cannot be updated (auto generated)).
2- OrgCode int not null (a dropdownlist that is taken from another table).
3- IPAddress varchar(50) not null (textbox).
and I am getting this error when trying to update:
ObjectDataSource 'ODSIPAddress' could not find a non-generic method 'UpdateQuery' that has parameters: OrgCode, IPAddress, original_IPAddressID, Original_OrgCode, Original_IPAddress.
Here is the query that I am using for updating in the dataobject:
UPDATE DHS_IPAddress
SET OrgCode = @OrgCode, IPAddress = @IPAddress
WHERE (IPAddressID = @Original_IPAddressID) AND (OrgCode = @Original_OrgCode) AND (IPAddress = @Original
What should I do to solve this problem.
I realy wish to get a clear answer.
|
|
|
|
|
Since you are using an object datasource it is expecting that your update method will have parameters for all the editable fields in your gridview row. You need to create an update method and point to it in your objectdatasource. The signature of that method must match what the objectdatasource expects or it won't work. Inside that method take the three fields and call your update method.
Hope that helps.
Ben
|
|
|
|
|
Hello Everyone,
Can anybody let me know how to embed Real Player in web application
|
|
|
|
|
|
Hi!
on a site I'm writing i use a TextBox and a Button for some search functionality..in the Button's onClick event i assigned a method :
<br />
public void Search(object sender, EventArgs e) {<br />
Response.Write(string.Concat("<script>window.open(\"SearchResluts.aspx?KeyWord=", tbSearch.Text, "\",\"iContent\");</script>")); <br />
}<br />
all it does is open SearchResluts page in iContent iframe.. above the button and textbox there is a treeview and when i click the button it does what it should and changes font-size in the treeview..
i saw it somewhere before that after postback some control's font-size is changed (for larger one)..
does anyone have any idea why this happens and maybe knows a workaround?
thanks for any help..
life is study!!!
|
|
|
|
|
Instead Of Response.Write , try this
Page.RegisterStartupScript("p", string.Concat("window.open(\"SearchResluts.aspx?KeyWord=", tbSearch.Text, "\",\"iContent\");"));
" If u got solution plz vote here "
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
You should use RegisterClientScriptBlock instead. When you do a Response.Write the code gets written on top of the page and that affects the font sizes. When you use RegisterClientScriptBlock , the code goes into the HTML tag.
This code is for Asp.Net 2.0, if your using Asp.Net 1.1 then you will have to use Page.RegisterClientScriptBlock
StringBuilder strScript = new StringBuilder();
strScript.Append("<script language="javascript">window.open('FileToOpen.aspx');</script>");
ClientScript.RegisterClientScriptBlock(Page.GetType(), "subscribescript", strScript.ToString());
Tarakeshwar Reddy
MCP, CCIE Q(R&S)
There are two kinds of people, those who do the work and those who take the credit. Try to be in the first group; there is less competition there. - Indira Gandhi
|
|
|
|
|
When you use javascript using response.write,
the javascript is written before <doctype...> tag
That makes the browser ignore the
doctype, and the page is displayed in quirks mode.
The solution suggested above is the best way to do it.
There is also a workaround:
write response.write(<doctype.....>) code before response.write tag.
don't know how good this solution is, but it works perfectly well.
|
|
|
|
|
Hi All,
I would like to Embed a Window media player inside a gridView.
Here is the Window media player tag in HTML
<object
id="mediaplayer"
classid="clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http: activex.microsoft.com="" activex=""
="" controls="" mplayer="" en="" nsmp2inf.cab#version="5,1,52,701"
STANDBY="Loading" microsoft="" windows="" media="" player="" components..."
type="application/x-oleobject">
<param name="fileName"
value="http://hotwired.lycos.com/webmonkey/radio/WMRadio7.mp3" />
<param name="animationatStart" value="true" />
<param name="transparentatStart" value="true" />
<param name="autoStart" value="true" />
<param name="showControls" value="true" />
How is that possible?
Thanks for your help.
|
|
|
|
|
I think it is possible. What error are you getting??
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Thanks for your response.
Here is the Error :
System.Web.UI.Webcontrols.datacontrolFieldCllection must have items of type 'System.UI.webControls.DataControlField' 'Object' is of type system.web.ui.objectTag'
I am just trying to put object code inside asp:griedview and coulmn template.
Thanks
|
|
|
|
|
Hi,
We got to convert a doc to pdf format for that we installed a printer and the conversion works fine
Now the same should be implemented through webservice, so we have sent the name of the file and the printer to the webservice and then print the document however the operation fails!
Are there any steps to be taken when implementing the same through webservice?
When checked the printer it shows different owner and port when trying to print through web service, is there a way that i can change these settings?
Thanks,
gauthee
|
|
|
|
|
Maybe you are having a permissions problem? by default, the web service runs as user ASPNET on local machine. Probably that ASPNET doesn't have enough permissions to run the print job. What you could do is make ASPNET impersonate another user who has permissions to print...or you could give ASPNET those permissions. Or am I missing something?
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
thanks for the reply talal.
all permissions are given, to the printer aspnet is added with full permissions.
is there anything else that i missed?
gauthee
|
|
|
|
|
hmm, well I don't know. I haven't done that before. How are you printing? Are you calling an application from your web service or is it the web service that is printing (from inside the code)?
-- If this is a post that has been helpful to you, please vote for it. Thank you!
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Printing - there is a printer driver installed in the machine i.e. novapdf printer
all i do is create a word object and use the print method to print the doc, prior to this i would set the printer as novapdf printer thats it!
gauthee
|
|
|
|
|
I want to encrypt an URL so that user cannot see the query string values and all that.
I think it can be done by writing some codes in Global.asax file but I cannot do so.
Help me out.
Thanks in advanced.
Divyesh
|
|
|
|
|
|
sorry buddy that url does not exists.
thank you
divyesh
|
|
|
|
|
|
The following code,
PageDetails.Request.QueryString.ToString()
Returns the following.
NewsID=66NewsID=66
Any ideas anyone?
|
|
|
|
|
I take it the newsId only appears in there once ? Why are you calling ToString ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|