|
you can use
TreeView for that
|
|
|
|
|
you will reqiuire to have a XSLT File to dine the html template and merge it with your xml to get the coresponding HTML
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
hi friends
i having gauge (dial) chart in flash format.how can i convert in asp.net
and how can i write the code in .net
regards
saravanan
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
|
After navigating from one page to another and finally loggig out from the website, still it loads the page afte clicking the back button, which fails the authentication , which i made for the users.How should i overcome this problem?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
After authenticate You can redirect the page using following code
FormsAuthentication.RedirectFromLoginPage(Login1.UserName, true);
and Logout uisng
FormsAuthentication.SignOut();
|
|
|
|
|
|
Ok, so I've got a web service that I want to hide the auto-generated wsdl help page. According to the MSDN page here[^] the following code will redirect any browser-based request for the .asmx page:
<webServices>
<wsdlHelpGenerator href="/blank.htm" />
</webServices>
However, when I put this in the System.Web element of the web.config and request the .asmx page, instead of getting blank.htm I get a HTTP 404 error saying the .asmx file has been moved or doesn't exist. That's not supposed to happen. Anybody know what's going on and how to fix it?
|
|
|
|
|
blank.htm
does this page exist in your website?
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
jgasm wrote: does this page exist in your website?
While that's the obvious question, yes it does exist. What's even more ineresting is if I use blank.html instead of blank.htm I get a different error about no build component specified for blank.html.
|
|
|
|
|
Shouldn't this:
<protocols>
<remove name="Documentation" />
</protocols>
Be in between the webServices tags:
FyreWyrm wrote: <webservices> <wsdlhelpgenerator href="/blank.htm">
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
This is one of the options we could use. This approach though disables auto-discovery of the WSDL by consumers of the web service. If I wanted to use this, then I would have to provide a custom WSDL to any consumers of the web service.
|
|
|
|
|
does your blank.htm exist on the same level, as in are they BOTH in the root folder?
if so, you should remove the slash before the blank.htm in the web config.
change to this:
<webServices>
<wsdlHelpGenerator href="MyBlank.htm"/>
</webServices>
not this:
<webServices>
<wsdlHelpGenerator href="/MyBlank.htm"/>
</webServices>
IF that slash isn't what's creating the location problem...then I'm all out of ideas
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
They are in the same root folder. I tried it both ways, with the slash and without. It didn't make a difference. Hopefully I can figure this out tomorrow. It's for a demo app that was supposed to be finished Monday afternoon. There's nothing like being given less than 8 hours to create two full-featured demo apps. I got one finished, this is all that's holding up the other one.
Thanks for your help though jgasm. If I get this sorted out tomorrow I'll come back and post the resolution.
|
|
|
|
|
Okay I got it.
This is my web.config in a brand new asp.net app.
<?xml version="1.0"?>
<!--
-->
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<webServices>
<wsdlHelpGenerator href="blank.aspx"/>
</webServices>
<compilation debug="true"/>
<authentication mode="Windows"/>
</system.web>
</configuration>
I changed it to a .aspx because the .htm and .html have issues out of the box basically. Where as the web server knows how to render the .aspx.
The location bar will not change. It will still show the address to the service. The page that loads up in the services location is the blank.aspx.
I just changed it from htm or html to aspx and this has worked when you go directly to my web service file service.asmx
-----------
when using a .htm the web config needed additional handlers to know what to do with the .htm which is why i changed it to aspx because i dont see why it would matter as long as the user sees the correct content.
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
Thanks a bunch for this jgasm. This worked perfectly. I would have posted this earlier, but I'm not allowed to post to this site from work. I can read all day long, but can't post.
|
|
|
|
|
I am having problems getting this to work. I have it where it inserts the data from some text boxes above. So It Inserts and Deletes just fine.
When it comes to updating and search for in between dates I have problems.
Ok in the dialog for the update command it has the command for updating the fields. So when you click update in the grid view where are the commands that make it update? It will not update. When you change something and click UPDATE it just goes right back to what it was.
Also how do I search for between dates? I have two text boxes and set the
SQLdatasource1.SelectCommand = String.Format("SELECT * From [Clipboard] WHERE [Date] Between {0} AND {1}", txtBeginningDate.Text, txtEndDate.Text);
Now when you enter 05-05-2008 in the text boxes and hit my SEARCH button it says: Failed to convert nvarchar to int. Where is it converting to INT? I have it set to nvarchar???
BTW I am using MVS 2008 Pro, and I am not writing a lot of these commands. It is generated for me but I can't seem to get it to do those things.
|
|
|
|
|
well let's take this one at a time.
first:
the date format issue.
Are you sure you don't need to do some kind of
Convert.ToDateTime(txtBeginningDate.Text) in order for the STRING in that text box to convert to DateTime? beause right now it is trying to take a set of characters and do something with them.
*You can only search legit by date when the field in the database is a DateTime field.
On your update command in the gridview make sure you have the Where clause set correctly. As in Update [tablename] Set [column name] = value WHERE id = ?
Does that make sense?
Check the update parameters in the gridview code to make sure it's using all the necessary ones. And by that I mean the where clause should use a column that identifies that record only.
Here's some help, could be quite a few things...if you want to narrow it down a bit
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
Ok I see what you are saying.. but won't Convert.ToDateTime insert time to? I just need the Date. Also I do not have any parameters set up in the update. When someone clicks the update in the column (Update) next to the row (this is all built into the gridview) how do I specify what it is updating?
|
|
|
|
|
Well I guess if I still convert the users input (after setting a validation like \d{2}\\d{2}\\d{4}) it will still convert and do the calculation right. Because if you don't specify a time it will input 12:00:00 AM for you.
Also here is what I have for the update:
UPDATE Clipboard SET County = @County, Type = @Type, Date = @Date WHERE (IncidentNumber = @IncidentNumber)
|
|
|
|
|
so in your datasource you need to specify under the "Update Parameters" section each one of those
<UpdateParameters>
<asp:Parameter Name="county" Type="String" />
<asp:Parameter Name="type" Type="Int32" />
<asp:Parameter Name="Date" Type="DateTime" />
</UpdateParameters>
make sure the parameter datatypes match the sql data types.
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
Well one way to do this is to in the asp:Gridview tag code you can add
DataKeyNames="[id column name here]"
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="lvl1_id"
DataSourceID="SqlDataSource1" CellPadding="4" ForeColor="#333333" GridLines="None">
This will make whatever you put in that for a column the way gridview identify records. So if you're records have an ID column, it should be that. This is probably the method I would use.
AND make sure your datasource has an update parameter set:
<UpdateParameters>
<asp:Parameter Name="lvl1_name" Type="String" />
<asp:Parameter Name="lvl1_id" Type="Int32" />
</UpdateParameters>
This is part of the DataSOURCE code. See the update parameters....in the SQLDataSource, this is where you can set it up. what this is saying it take the text box for lvl1_name and the lvl1_id for that record and perform a sql update. So if it's not updating, I would say it's because your datasource code in the .aspx is missing those update parameters. I will include a datasource next.
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:blahblah %>"
DeleteCommand="UPDATE [bmj_level1] SET [enabled] = 0 WHERE [lvl1_id] = @lvl1_id" InsertCommand="INSERT INTO [bmj_level1] ([lvl1_name]) VALUES (@lvl1_name)"
SelectCommand="SELECT [lvl1_id], [lvl1_name] FROM [bmj_level1] WHERE [enabled] = 1 ORDER BY [lvl1_name]" UpdateCommand="UPDATE [bmj_level1] SET [lvl1_name] = @lvl1_name WHERE [lvl1_id] = @lvl1_id">
<DeleteParameters>
<asp:Parameter Name="lvl1_id" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="lvl1_name" Type="String" />
<asp:Parameter Name="lvl1_id" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="lvl1_name" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
Ok I am sort of following you.. Here is my SQLDataSource Code:
<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="">"
DeleteCommand="DELETE FROM [Clipboard] WHERE [IncidentNumber] = @IncidentNumber"
InsertCommand="INSERT INTO [Clipboard] ([County], [Type], [Date]) VALUES (@County, @Type, @Date)"
SelectCommand="SELECT * FROM [Clipboard]"
UpdateCommand="UPDATE Clipboard SET County = @County, Type = @Type, Date = @Date WHERE (IncidentNumber = @IncidentNumber)";
<deleteparameters>
<asp:parameter name="IncidentNumber" type="Int32" />
</deleteparameters>
<updateparameters>
<asp:parameter name="County" type="String" />
<asp:parameter name="Date" type="String" />
<asp:parameter name="IncidentNumber" type="Int32" />
<asp:parameter name="Type" type="String" />
</updateparameters>
<insertparameters>
<asp:controlparameter controlid="txtCountyAdd" name="County" propertyname="Text" type="String" />
<asp:controlparameter controlid="txtTypeAdd" name="Type" propertyname="Text" type="String" />
<asp:controlparameter controlid="txtDateAdd" name="Date" propertyname="Text" type="String" />
</insertparameters>
</asp:sqldatasource>
DELETE and UPDATE do not work.... uhmm
modified on Tuesday, May 20, 2008 11:47 PM
|
|
|
|
|
In your <asp:gridview> code in there add this:
DataKeyNames="IncidentNumber" like this:
<asp:GridView ID="GridView1" runat="server" DataKeyNames="IncidentNumber" DataSourceID="SqlDataSource1" GridLines="None">
now try it.
-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford
|
|
|
|
|
awesome! your a life saver!
|
|
|
|