|
|
when i use the gridview the i am unable to update and delete while select option work properly
|
|
|
|
|
And what did you do to update/delete? Until you share the effort made, any specific issue - how can anyone help you?
Select, Update, Delete are standard features whose implementations are widely discussed and shared on web, look at them and learn.
|
|
|
|
|
I need to create a pop up window in the top of the web page with the message"Please disable your pop up blocker" . Can you please help me out
Beni
|
|
|
|
|
Beniston1205 wrote: I need to create a pop up window in the top of the web page with the message"Please disable your pop up blocker" . Can you please help me out
One way around would be to create a div section, hidden by default, and to "pop it up" with JavaScript by toggeling the visibility. That way there will not be an additional window
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Beniston1205 wrote: create a pop up window
Popup are blocked by settings. You should use new child window. Use Window.Open[^] method to achieve it.
On button click, call this window.open client side using Javascript.
|
|
|
|
|
Hi,
I want to know how can I set a watermark for a textbox including when Password property is set to true?
|
|
|
|
|
Start here[^].
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
my problem is how to display selected item and a content of textbox in a gridview after a submit button dynamically (i will repeat more than 1 time) and so automatically the submit button will insert data in DB(entity framework)
the DropDownList1 is populated from db
to explain more this is my page :
<fieldset id="Item2">
<legend> Item Information</legend>
<br />
<br />
<center>
<table>
<tr>
<td>
<asp:Label ID="lblIemName" runat="server" >Item Name</asp:Label>
</td>
<td>
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true"
AppendDataBoundItems="true" EnableViewState="true">
<asp:ListItem Value="0">--Select--</asp:ListItem></asp:DropDownList>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblQuantity" runat="server" >Quantité</asp:Label>
</td>
<td>
<asp:TextBox ID="txtQuantity" runat="server" Width="62px"></asp:TextBox></td>
<td><asp:ImageButton ID="btnAddItem" runat="server" Height="20" Width="20" ImageUrl="~/Images/Add.png" OnClick="btnAddItem12_click" />
</td>
</tr>
</table>
</center>
<br />
<br />
<center>
<asp:GridView ID="gvPurchasedItem" runat="server" AutoGenerateColumns="False" DataKeyNames="IDItemLinePurchased"
BackColor="Aquamarine">
<Columns>
<asp:BoundField HeaderText="CategoryName" ControlStyle-Width="250" DataField="CategoryName">
<ControlStyle Width="250px"></ControlStyle>
</asp:BoundField>
<asp:BoundField HeaderText="ItemName" DataField="ItemName" />
<asp:BoundField HeaderText="Quantity" DataField="Quantity" />
</Columns>
</asp:GridView>
</center>
</fieldset>
my behind code is :
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Populateddlitem();
}
}
void Populateddlitem()
{
DropDownList1.DataTextField = "ItemName";
DropDownList1.DataValueField = "IDItem";
DropDownList1.DataSource = LogicItem.Instance.GetItems();
DropDownList1.DataBind();
}
protected void btnAddItem_click(object sender, ImageClickEventArgs e)
{
// insert bloc
ItemLinePurchased res = null;
if (ID == 0)
res = new ItemLinePurchased();
else res = LogicItemLinePurchased.Instance.GetItemLinePurchasedByID(ID);
res.Quantity = Convert.ToInt32(txtQuantity10.Text);
res.IDItem = Convert.ToInt32(DropDownList1.SelectedItem.Value);
ViewState["ddl"] = DropDownList1.SelectedItem.Value;
res.IDPurchasesDoc = Convert.ToInt32(ViewState["PurchasesDocid"]);
res.State = "IsActive";
LogicItemLinePurchased.Instance.SaveItemLinePurchased(res);
int aaa = DropDownList1.SelectedIndex;
int bbb = Convert.ToInt32(Session["ddlState"]);
ViewState["id"] = res.IDItemLinePurchased;
//display grid view
gvPurchasedItem.DataSource = (from ItemLinePurchased in LogicItemLinePurchased.Instance.GetAllItemLinePurchased()
where ItemLinePurchased.IDItemLinePurchased == Convert.ToInt32(ViewState["id"]) && ItemLinePurchased.State == "IsActive"
select new
{
ItemLinePurchased.IDItemLinePurchased,
ItemLinePurchased.Item.Category.CategoryName,
ItemLinePurchased.Item.ItemName,
ItemLinePurchased.Quantity,
}).ToList();
gvPurchasedItem.DataBind();
}
any one have a solution to my problem post it and thanks
|
|
|
|
|
Hi,
I want to know how can I let Google do this for me? I mean the map AND and pics shown in the right side of the search result in this image:
http://www.rmc.bh/temp/geant.jpg
|
|
|
|
|
You can't change their UI.
No, that's a lie; you could install Greasemonky, write some JavaScript and remodel the page everytime it's loaded to your liking.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Did you read the Google Map API, and register for a key to use it?
The google maps web site has a complete how-to on how to use the mapping system complete with pre-written code.
|
|
|
|
|
Hi Sir/Madam,
I have done Login page in "asp.net mvc pattern".But im getting one runtime error like
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.ArgumentException: Column 'Emailid' does not belong to table Table.
So,Could any one help me on this
Here is my project solution and
database(table and StoredProcedure)
KRayudu
|
|
|
|
|
Well, I can't see your code, but the exception is pretty clear. You have a column called EmailID and it doesn't belong in the database table Table.
|
|
|
|
|
The error is simple.
The column Emailid does not exists in the table from which you are fetching the data.
If it exists then check the spelling. There might be problem in your SQL query also.
Thanks.
Tarun Mangukiya
|
|
|
|
|
how to fix the MachineToApplication error in web config
|
|
|
|
|
|
Hi All,
I have used channel factory class to get wcf service proxy object, after executing the methods in the service, its taking too long to give the result and aborting with web service has closed the connection. Is there any way to close the ChannelFactory connection once after its done executing the methods.
Its very urgent please help me.
Below is my code for getting the channel.
Public Function GetChannelForService(ByVal source As String, ByRef loger As Logger) As IStayAtWorkService
Dim channel As IStayAtWorkService = Nothing
Dim objStayAtWorkService As IStayAtWorkService = Nothing
Dim factory As ChannelFactory(Of IStayAtWorkService)
loger.log(1, "Begin GetClaimRequestContactFromSession, StayAtWorkServiceAddress" + source)
Try
Dim result = String.Empty
'Get the channel from WCF
Dim address As EndpointAddress = New EndpointAddress(source)
Dim binding As WSHttpBinding = New WSHttpBinding()
binding.MaxReceivedMessageSize = 2147483647
binding.ReaderQuotas.MaxArrayLength = 2147483647
binding.MaxBufferPoolSize = 2147483647
binding.SendTimeout = New TimeSpan(1, 1, 1)
binding.ReceiveTimeout = New TimeSpan(1, 1, 1)
'binding.CloseTimeout = New TimeSpan(1, 1, 1)
'binding.OpenTimeout = New TimeSpan(1, 1, 1)
If factory Is Nothing Then
factory = New ChannelFactory(Of IStayAtWorkService)(binding, address)
ElseIf factory.State = CommunicationState.Closed Then
factory = New ChannelFactory(Of IStayAtWorkService)(binding, address)
End If
channel = factory.CreateChannel()
'Dim tempObj As IStayAtWorkService = channel
'objStayAtWorkService = DeepClone(tempObj)
'If (Not factory.State = CommunicationState.Closed) Then
' factory.Close()
'ElseIf factory.State = CommunicationState.Faulted Then
' factory.Abort()
'End If
Catch ex As Exception
loger.log(1, "Catch GetChannelForService, Excelption : " + ex.ToString())
Finally
End Try
Return channel
'Return objStayAtWorkService
End Function
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
This article says the best way is to load the class is in a constructor, so it's only loads once, and not the service itself, in which it loads a new instance of the class each time the service is called.
So your speed or crash issue is probably because the garbage collector is not able to clean your memory heap, and does not know which area or segment of the heap to clean or deallocate, and keeps using the last allocation of the instance. I would consider that leaking memory on the server.
I may be wrong, feel free to school me on this.
I know how to write constructors and deconstructors with callbacks in c++, but I'm kind of fuzzy on it for asp.net. From looking at this tutorial, it looks the same if your coding in csharp.
You'll probably have to write a new class using the constructor, and perhaps add a deconstructor when your totally done with the class. Then come up with a new way to call the service.
[Constructors and deconstuctors]
http://csharp.net-tutorials.com/classes/constructors-and-destructors/[^]
[Reference or credit to]
http://stackoverflow.com/questions/1576559/need-a-way-to-close-a-channelfactory-when-the-client-only-know-of-the-interface[^]
|
|
|
|
|
I have no idea what it does, but if I were to write one, it would be sort of like this. I should of called it channelStructure or cStructure, just my thought before posting. I think it needs a factory open
So you create the class based on a session.value, when done, destroy the session. That could of been placed in the new and finalize
Feel free for anyone to tweak it and make it better, I had 15 minutes to kill before leaving today.
[Edit]
It's not tested at all, nothing to test it on.
Imports System.ServiceModel
Imports Microsoft.VisualBasic
Public Class channelFactory
Private factory As New ChannelFactory(Of ServiceModel.IServiceChannel)("WSHttpBinding_ISampleService")
Private wcfClientChannel As ServiceModel.IServiceChannel
Private address As EndpointAddress
Private channel As IClientChannel
Private binding As WSHttpBinding
Private source As String
Public Sub New(ByVal Source As String)
factory.Endpoint.Behaviors.Add(New EndpointBehaviorMessageInspector())
wcfClientChannel = factory.CreateChannel()
address = New EndpointAddress(Source)
binding = New WSHttpBinding()
binding.MaxReceivedMessageSize = 2147483647
binding.ReaderQuotas.MaxArrayLength = 2147483647
binding.MaxBufferPoolSize = 2147483647
binding.SendTimeout = New TimeSpan(1, 1, 1)
binding.ReceiveTimeout = New TimeSpan(1, 1, 1)
binding.CloseTimeout = New TimeSpan(1, 1, 1)
binding.OpenTimeout = New TimeSpan(1, 1, 1)
channel = factory.CreateChannel(address)
End Sub
Protected Overrides Sub Finalize()
factory.Close()
End Sub
Public Function sendMessage(ByRef m_Structure As messageStructure) As Integer
Dim dwExitCode As Integer = 0
'Send Request
'Get Response
'Parse response
'Update Structure
m_Structure.m_ID = 0
m_Structure.m_Name = ""
m_Structure.m_Task = ""
Return dwExitCode
End Function
End Class
Public Class EndpointBehaviorMessageInspector
End Class
Public Structure messageStructure
Dim m_ID As Integer
Dim m_Name As String
Dim m_Task As Integer
End Structure
|
|
|
|
|
Hi,
Thanks a lot for your advice, its working now.
I got some of your idea and some from my side at last its working now.
Thanks for the help.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
That was the purpose of the sample, just something to feed off of, so you can create your own solution.
I'm surprised that no one jumped in to refine my sample code.
Good Job!
|
|
|
|
|
I would like to know what I can check on to view the performance of a 2010 web form C# application. To accomplish this goal, I have the following questions:
1. Is there a web page analyzer that can be run against the web form applicationso that we can see exactly what is being loaded and what takes the most time to load?
2. Can view selectively turn off session state? If so, how do you accomplish this goal?
3. Can I selctively turn off view state? If so, how can I selectively turn off viewstate? Are there cases where I need to keep view state around? If so, when do I need to keep viewstate setup?
4. Are there other items I can check on to monitor the performance of a website? If so, hwat are they and how do you use them?
|
|
|
|
|
|
Hi all,
I have a requirement like this. A table has a set of say 10 fields. The user wants to search the table using any combination of fields. Instead of adding a fixed number of textboxes and labels (10),I have been thinking about creating a composite control TextBoxList..which would probably inherit from TextBox..Label..CheckBoxList. So now I ll be able to add any number of textboxes with labels by passing a parameter. I have just started reading about composite controls in asp.net 4.0. Any suggestions on how to build it would help me a lot. Thanks.
P.S. My First Post Here..
There is no great genius without some touch of madness - Seneca, Epistles
modified 2-Aug-12 2:08am.
|
|
|
|