|
Hi Friends,
I want to add controls dynamically to the form at any position as i wish.For that i want to identify the location on the form(page).How to do it in asp.net 2.0 . I know that so many talented people are here to help us.Please post a better solution for this as soon as possible.
Thankyou to one and all,
Regds,
Hari.
|
|
|
|
|
Hi Friends,
This is HariBabu, I want to drag items from one listbox and drop it in another listbox. I want code for this fuctionality in asp.net with c#. i know so many talented guys are here to help me.
Thankyou Guys(Also Ladies)
Regds,
Hari.
HariBabu Kuricheti
|
|
|
|
|
|
Hi Naveed Kamboh,
Thanks for giving response and i saw the examples which you send to me ,it is some what helpful for me, but is there any perfect code for that type of functionality in webapplications(Asp.net 2.0 c#).If any Please send to me .
Anyway Thanks for your contribution.
Regds,
Hari.
|
|
|
|
|
I have a column which is an edit button in datagrid , i want it invisible when the page load , and when i press another click button, the edit button inside the datagrid become visible ? I need to code it in HTML more better ,not in code-behind, thanks you very much.
Best regards,
Chee ken
|
|
|
|
|
using property a column can be make invisible.
<asp:EditCommandColumn Visible="False" ButtonType="PushButton" UpdateText="Update" HeaderText="Edit" CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
=postmaster
www.programmingknowledge.com
-- modified at 23:43 Thursday 24th August, 2006
|
|
|
|
|
I Got it !!
Thanks..
Best regards,
Chee ken
|
|
|
|
|
Hello,
I am trying to add a javascript block to a page in runtime.
I am getting an error because I not setting the type but I don't know how to do it.
My code is:
Dim urchinTracker As String = "<script type='text/javascript'>" & _
"_uacct = 'UA-XXXXX';" & _
"urchinTracker();" & _
"</script>"
If (Not ClientScript.IsClientScriptBlockRegistered("UrchinTracker")) Then
Page.ClientScript.RegisterClientScriptBlock("UrchinTracker", urchinTracker) >> Problem is here
End If
Basically, I am adding the code for Google Analytics.
Thanks,
Miguel
|
|
|
|
|
You can choose a specific type such as the Page type to pass in to the method.
|
|
|
|
|
How do I set focus after a button is clicked to go directly into a textbox. Or even if its on load have the cursor right on the textbox automaticall
Thanks
|
|
|
|
|
|
Create a module level function:
Module Module1<br />
Public Function SetFocus(ByVal FocusControl As Control) As String<br />
'Setting focus to supplied control<br />
Dim Script As New System.Text.StringBuilder<br />
Dim ClientID As String = FocusControl.ClientID<br />
<br />
'Building java script<br />
With Script<br />
.Append("<script language='javascript'>")<br />
.Append("document.getElementById('")<br />
.Append(ClientID)<br />
.Append("').focus();")<br />
.Append("</script>")<br />
End With<br />
<br />
Return Script.ToString()<br />
End Function<br />
End Module
call the function above in button click event
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
'set focus <br />
RegisterStartupScript("setFocus", Module1.SetFocus(TextBox1))<br />
End Sub
=postmaster
http://www.programmingknowledge.com/[^]
|
|
|
|
|
In the Page_Load Event, Type in:-
Page.RegisterStartupScript("ss", "document.getElementById('" & TextBox1.ClientID & "').focus();")
Thanks & regards,
Suresh Dayma
|
|
|
|
|
I have a GridView in my Web page. For one of the columns i set visible = false.
I looped through the rows in the GridView and tried to get the value for the column
for which the visible property is false and i got an empty string. When i set the
visible property to true i was able to retrieve the value. Is this the normal behaviour
of the GridView or am i doing any thing wrong here.
Is there a way to get the value for a particular cell even though the visible property is false
Thanks
Kal
|
|
|
|
|
AFAIK, this behaviour is by design, and you have a couple of options to work around:
+ Don't use Visible property, use stylesheet to hide the column.
+ Save the value of the insivible column somewhere else like the DataKeys collection of the GridView.
|
|
|
|
|
Hi Dear,
If you use RowDataBound event of gridveiw
i=0,1,2.... [column number]
if (e.Row.RowType==DataControlRowType.Header ||e.Row.RowType==DataControlRowType.DataRow)
e.Row.Cells[2].Visible = false;
it will hide the column and you can use column value in your project there wont be any problem.
if you need further help just email me.
thanks
Naveed Kamboh
|
|
|
|
|
Hi,
In the web service context,HTTP is used to transport SOAP messages i.e SOAP over HTTP.
Then What is the difference between HTTP Protocal and SOAP Protocal?
Thanks in advance.
-- modified at 16:16 Thursday 24th August, 2006
|
|
|
|
|
The protocols are layered on top of each other. A bit simplified it works like this:
SOAP - handles messages in XML form, using HTTP request and responses
HTTP - handles requests and responses, using TCP streams
TCP - handles transport of data streams, using IP packages
IP - handles tre transport of packages
...and then some lower level networking
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Iam learning Web sevices.So idon't know these simple things.
I created a web service.And iam using Visual C# Express Edition.In the Client application I added the web reference to the service i created.It generates the Reference.map,service.disco,service.wsdl.
When we click on ADD WEB REFERENCE button one proxy class is generated.I think in that proxy class we have namespace and class name and methods .Using that namespace and classname we call out web service in the client.
But in C# Express Edition How to see the proxy class contents.
Please help me.
Thanks in advance.
|
|
|
|
|
If the client is not a web site, you can see the proxy class (Reference.cs) in the same folder as other files mentioned in your post. Otherwise, you can have a look at the temporary folder of the web site to see it.
|
|
|
|
|
|
I am working on creating a DAL and BLL for my app. DAL and BLL works great for Delete and Select statements but when it comes to update the data using GridView (which is the only control I've tried) I am not having any success. This is the error msg I am getting:
ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateForum' that has parameters: ForumID, forumName, forumDescription, Name, Description.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'UpdateForum' that has parameters: ForumID, forumName, forumDescription, Name, Description.
The problem is my method does not have parameters named Name & Description and I can't figure out why the GridView is passing Name and Description as parameters!
This is what my BLL method for update looks like:
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)] public bool UpdateForum(int forumID, string forumName, string forumDescription) {
ForumDataSet.ForumsDataTable forums = Adapter.GetForumsByForumID(forumID); if (forums.Count == 0) { // no matching record found; hence return false return false; }
ForumDataSet.ForumsRow forum = forums[0]; forum.Name = forumName; forum.Description = forumDescription; forum.ForumID = forumID; // Update the product record int rowsAffected = Adapter.Update(forum); // Return true if precisely one row was updated, otherwise false return rowsAffected == 1;
}
My parameter list in DataSource looks like this:
<UpdateParameters> <asp:Parameter Name="forumID" Type="Int32" /> <asp:Parameter Name="forumName" Type="String" /> <asp:Parameter Name="forumDescription" Type="String" /> </UpdateParameters>
And my GridView looks like this:
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="ForumID" DataSourceID="ObjectDataSource1">
<Columns> <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /> <asp:BoundField DataField="ForumID" HeaderText="ForumID" InsertVisible="False" ReadOnly="false" SortExpression="ForumID" /> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" /> </Columns>
</asp:GridView>
And my Data Set .xsd:
<UpdateCommand> <DbCommand CommandType="Text" ModifiedByUser="False"> <CommandText>UPDATE [Forums] SET [Name] = @Name, [Description] = @Description WHERE (([ForumID] = @Original_ForumID))</CommandText> <Parameters> <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Name" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Name" SourceColumnNullMapping="False" SourceVersion="Current"> </Parameter> <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Description" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Description" SourceColumnNullMapping="False" SourceVersion="Current"> </Parameter> <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_ForumID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="ForumID" SourceColumnNullMapping="False" SourceVersion="Original"> </Parameter> </Parameters> </DbCommand> </UpdateCommand>
Thanks in advance.
|
|
|
|
|
Hi there. The ObjectDataSource automatically creates the parameters for the bound fields defined in the GridView control, so you no need to specify the parameters in the UpdateParameters, and also make sure the names of the update method's parameters are similar to what specified in the DataField property.
|
|
|
|
|
in the dataset right-click the main table adapter (it should be called fill/get data()) and choose configure. Hit Advanced Options and uncheck Refresh the data table and then continue with the wizard. you will have to refresh both the objectdatasource and the gridview.
|
|
|
|
|
In defining the attributes in my SQL data base in my .ASP environment I have defined an attribute as type 'bit". I thought this would allow one to only be able to enter "1" for "yes" or 0 for "no' however, when I try enter "1" it gives me na error message: "String not recognized as boolean"! WTF!?! Grrrrrrh
Every religion's trina tell us that every other religion's going down to hell! -- Rory Lewis 1999
|
|
|
|