|
The hyperlink may have an OnClientClick function, I know a button does. In there you can write a function call to a method that returns true or false, and the return value will decide if the OnClick postback is called. If the hyperlink does not offer that, why not use an anchor tag instead of a server control, then you can have the link call a javascript method which redirects only if certain conditions are met.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i should not use the button control, it will not show me the data associated with the page (which i have binded with the page name (query string sort of things.)), the page , where i will redirect the user to some respective page.how can i use the anchor tag , to implement it?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
You may try by calling a function on the onclick event of the hyperlink.
Use following logic.
//Process
if (true)
window.location.href ="url"
else
//do nothing
Nitin
-- modified at 4:40 Wednesday 7th November, 2007
Don't Quit
|
|
|
|
|
You can disable hyperlink
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Good Day,
I need some help identiying the proper command terminology to create the type of page I would like.
What I am trying to do is take a format that will have data populated into it, but on the previous page I cache a session variable where I have "number of servers" and that number will determine how many times that template will appear on the next page with incremented servers names (i.e. server1, server2 etc...).
A link or even just the terminology so i can google it will work.
thanks
|
|
|
|
|
I have a Repeater control that hosts simple User List rows of system users. Each row has an Edit icon, which the user clicks to open a User Details edit page. I have been told to remove the separate details page, and create a detail edit section that expands or collapses on demand, without leaving the base User List page. How do I go about this?
My first idea is to include an edit control on the item template of the Repeater, and simply use styling to hide the edit control until the edit icon is clicked. Then I set the display to a visible, and the edit control handles all the edit functionality itself. Is this the correct approach, how could I improve on this, and what pitfalls await me?
|
|
|
|
|
Repeater Control doesn't support this. You can use DataList Control which has a selected Item Template where you can have the template to show the Details of the Selected Item. This will expand when you select the item and collapse the selected item when you select the other item by changing the selectedItem Index in the code-behind. And it has Edit-Item Template to edit the Item.
-- modified at 4:43 Wednesday 7th November, 2007
Regards - J O H N -
|
|
|
|
|
Thanks, I've been looking at the DataList, and will look at it some more now. How does this expanding and collapsing work if, say, the row is the last row in a 'window' (a fixed size div)?
I wasn't planning on supporting this through the Repeater, but through Javascript. All the Repeater would do is emit the hidden DHTML for the the rows and detail, it would be agnostic as to what was happening.
|
|
|
|
|
yes, Using repeater you can have the Details in the <-div> hidden and show them when you select the Item. this(expand and collapse) can be acheived through javascript. The page which we are using here in (CP) is something similar to the interface which you are talking. But I don't think you can provide the edit option using repeater control. you have to take the user to a different page for editing.
Regards - J O H N -
|
|
|
|
|
I will also be providing the edit function through Javascript. I already do this in other pages, with in-grid editing, using the blur event of the various controls.
|
|
|
|
|
I think it's the right method. But after editing how will you update it back to the database ? I am confused how will you get an event for the button to update it back to database ?
|
|
|
|
|
We are trying to eliminate all save etc. buttons anyway, using Ajax. See me reply to John above.
|
|
|
|
|
Hi I have a html page in which I am loading an applet using applet tag. This html page is loaded in an iFRAME in the parent page. I am passing a few param tags one of which which have the URL of an aspx page. Now I want to pass the value of a Textbox on the parent page with the uploadURL as a QueryString. How can I do that?? Any help is much appreciated.
Below is the code that I have. Have a look at the param tag with name=uploadURL.
PS: I have written param as ##param as the line was getting skipped due to param tag in preview.
<applet name="uploadApplet"
="" code="javaatwork.myuploader.UploadApplet.class" archive="myuploader-free-signed-v181.jar, labels.jar" width="400" height="250">
<##param name="uploadURL" value="upload.aspx?FileName=[Here I want to provide a value from a Textbox on parent page]"/>
<##param name="successURL" value="success.html" />
Pankaj Chamria,
Software Programmer.
|
|
|
|
|
I am making a web application in which i want to create session so that when any user login that application can not hold that login period even if he is ideal.
hi
|
|
|
|
|
Hi,
U can use sesion timeout in code.
Session.Timeout = 100;
Session["Loggedin"] = "No";
or as you want, just spacify session timeout in gloab.asax
Dont provide in anywhere else in your application.
Thanks,
Sun Rays
|
|
|
|
|
Sun Rays wrote: Session.Timeout = 100;
Session("Loggedin") = "No";
Above code gives error
Session["Loggedin"]="No";
bEst rEgard
pathan
please don't forget to vote on the post that helped you.
|
|
|
|
|
dim session("sadadsad") = login
Piyush Vardhan Singh
|
|
|
|
|
ya man i done it. thankx a lot guyz.
// FormsAuthentication.RedirectFromLoginPage(User, true);
can anyone tell me wats this statement means and y we require this 1 , will it always call a default.aspx and if so , y ?
hi
|
|
|
|
|
Hi,
I am trying to transform an xml file to wml using asp.net. I get the xml file from sql server as a string. so I need to convert it to xml and tranform that xml file to wml.
Here is my code:
private void XmlTransformToWML(string hn_xml)
{
XmlDocument xmlDoc = new XmlDocument();
try
{
xmlDoc.LoadXml(hn_xml);
}
catch (XmlException e)
{
Response.Write(e.Message);
}
XPathDocument xpathDoc = new XPathDocument();
string xslPath = Server.MapPath("hnxml.xslt");
XslCompiledTransform myXslTrans = new XslCompiledTransform();
//Load the XSL stylsheet into the XslCompiledTransform object
myXslTrans.Load(xslPath);
myXslTrans.Transform(xmlDoc, null, Response.Output);
}
My problem is when I execute this code I am getting the following exception. I have a doubt, can we use XmlDocument as a argument to transform to wml.
Exception:
System.Xml.Xsl.XslTransformException: Attribute and namespace nodes cannot be added to the parent element after a text, comment, pi, or sub-element node has already been added. at System.Xml.Xsl.Runtime.XmlQueryOutput.ThrowInvalidStateError(XPathNodeType constructorType) at System.Xml.Xsl.Runtime.XmlQueryOutput.ConstructInEnumAttrs(XPathNodeType rootType) at System.Xml.Xsl.Runtime.XmlQueryOutput.WriteStartAttribute(String prefix, String localName, String ns) at System.Xml.Xsl.Runtime.XmlQueryOutput.WriteStartAttributeLocalName(String localName) at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator ) at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter) at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results) at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, TextWriter results) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at topic.XmlTransformToWML(String hn_xml) in d:\Thesis\Thesis Documentation\Codes From Fuchs\Original HNXML\Mobile Applications\topic.aspx.cs:line 71 at topic.Page_Load(Object sender, EventArgs e) in d:\Thesis\Thesis Documentation\Codes From Fuchs\Original HNXML\Mobile Applications\topic.aspx.cs:line 40
Any ideas would be appreaciated.
Thanks
Aruna.G
Aruna.G
|
|
|
|
|
SreejithAchutan wrote: string newConnectionString = @"roles="+DropDownList1.SelectedItem+"";
DropDownList1.SelectedItem.Text
Regards - J O H N -
|
|
|
|
|
XmlNodeList nodeList = xDoc.GetElementsByTagName("location");
By the above code we get the node named "location".How we get the subnode that located below the location tag.That means how we access the tags system.web and authorization tag dynamically.Thanks
|
|
|
|
|
Dim NodeList As System.Xml.XmlNodeList = xRequests.SelectNodes("/cwaEvents/userPresence/user")
u want like this
Piyush Vardhan Singh
|
|
|
|
|
XPathNavigator object has few methods to Navigate through the nodes of the XML document. You can make some slight changes to your code by using XPathDocument object and try something like this
Dim Doc As XPathDocument = New XPathDocument(path)<br />
Dim Navigator As XPathNavigator<br />
Navigator = Doc.CreateNavigator()<br />
Dim Iterator As XPathNodeIterator = Navigator.Select(Node)<br />
While Iterator.MoveNext()<br />
'your code here<br />
End While
XPathNodeIterator object has some more methods to access the child Nodes and Sub-Nodes within it.....
referred Microsoft Book - XML Webservices and Server Components.
Regards - J O H N -
|
|
|
|
|
private void SetConfigSettings()
{
string path = Server.MapPath("Web.config");
string newConnectionString = @"roles="+DropDownList1.SelectedValue+"";
XmlDocument xDoc = new XmlDocument();
xDoc.Load(path);
XmlNodeList nodeList = xDoc.SelectNodes("/system.web/location/system.web/authorization");
XmlNodeList nodeAppSettings = nodeList[0].ChildNodes;
XmlAttributeCollection xmlAttCollection = nodeAppSettings[0].Attributes;
//xmlAttCollection[0].InnerXml = txtKey.Text; // for key attribute
xmlAttCollection[0].InnerXml = newConnectionString; // for value attribute
xDoc.Save(path); // saves the web.config file
I gave the coode like that .But it willnot work.Plz help me.I want to change the roles in the allow tag that present in the subnode of authorization.How is it possible through the above code .What is the mistake.Thanks
|
|
|
|
|
i have some data , which is commig from the previous page .in the current page , i am fetching it using the query string at form load.
after clicking the close button of my aspx page , i am redirecting the user to some other page.
i am currently in the source file , where after clicking the close button , i am navigating the user , now the question is , how can i sent the data to that page , which was coming from the previous one.
i am writing there only
location.hef = 'pe.aspx';
how should i add the data , along with the page name.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|