|
|
The answer above from Mika is correct; however, another option is to just hover over the little line that shows up on your code. Then you can click the smart tooltip and it will show you what to do, in this case there should have been a "using System.Net" option likely.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
Hi everyone,
I already develop application booking room system, and now I want user can use OWA to access and booking room.
could everyone help me how to I can check user login OWA success or not. if success will redirect to other side if not return login form.
I using Exchange 2007 server.
thank you.
trtreterte
|
|
|
|
|
|
How can to change the properties of a control in the page?
|
|
|
|
|
Please do not repost.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
How can to change the properties of a control in another page?
|
|
|
|
|
You'll need to get an instance of the control and then you'll have access to any properties it exposes.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Create an object and use that instance so that u will get all the properties of that control which u created an object.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
Hello Experts,
I have a web page that takes lot of data from users. I want that to be stored in Database. So this is taking some time.
1) How can I fetch the data from webpage and store in Database (MySQL)? Don't say Dim FirstName as String=txtFN.Text.Tostring(). I know that, but should I Use those many string variables? I almost have 50+ controls that need to saved in Database on Submit button click. what are other options for this?
2)Meanwhile, I want all the controls of the page Editable=False. It means it should show a Progress which stops the user from clicking on page here and there. I have done progress bar in Windows application 2 days back from the guidance given by experts in this Forum. Now its time to do in Web application. Please suggest me how do proceed
Your help is much appreciated.
Thanks
Happy Coding!
modified 23-Dec-14 13:15pm.
|
|
|
|
|
If you want to block input, then you can either disable all the textboxes or input elements
Or use a Modal Overlay, sort of a shield that lays over the page and is colored.
This is simple modal, it uses jquery to create a modal overlay, and what ever else you want in the center like a spinning gif image.
http://www.ericmmartin.com/projects/simplemodal/[^]
Or you can use the update panel in asp.net, in conjunction with the update progress.
http://msdn.microsoft.com/en-us/library/bb386421%28v=vs.140%29.aspx[^]
None of them are very straight forward and easy to implement. It took me years to really understand how they work and how to fully customize them. But the latter would be easier for you if your not able to write javascript or jquery.
But to start, you really need a vision of how you want it to look first, and how it should respond.
On the other question, how to transfer the data to the server, I'm not touching that one.
It's the HTTP Protocol, and works one way. All the input elements have to be posted back to the server, and you have to catch the values on the server side. So that's 50 values for you.
|
|
|
|
|
Ok, I found a way to do progress bar, but my GIF images are showing as little Cross mark on ASPX page when I Run the Code. Do you know how can I get rid of Cross mark and get my progress bar work?
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
I Solved this. My GIF was not Properly placed in Images folder of Solution explorer
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
if your using IE, then it should be a small red X
Your image url is not correct, and it the browser could not find the image.
Check the HTML source, and see what the image url is, and correct it.
|
|
|
|
|
I solved it before I saw your reply. And you are correct Image URL is not recognized properly.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
Hello Experts,
I wanted to display a Gridview with headers and button in the Gridview where users can enter the textfields in Gridview and click on button which adds new item in gridview. But my gridview is not displaying in browser. No matter what. Please help me in this.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
What do you mean of your grid view is not displayed in browser.Can you paste your aspx page and your cs bind funciton and whare do you call your bind method.
|
|
|
|
|
What I mean is all the controls are displayed but not my grid, I want an empty grid tobe displayed and user can enter the data and click on add new row button which appends the rows. Here is the code
<asp:Panel ID="Addpn" runat="server" CssClass="Panels">
<div id="divGrid">
<asp:GridView ID="gdvItems" runat="server" Visible="true" ShowFooter="true" AutoGenerateColumns="false">
<Columns >
<asp:BoundField DataField="ItemNo" HeaderText="ItemNo" />
<asp:TemplateField HeaderText="TireSize">
<ItemTemplate>
<asp:TextBox ID="txtTireSize" runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="DOT">
<ItemTemplate>
<asp:TextBox ID="txtDOT" runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="RemovalArea">
<ItemTemplate>
<asp:TextBox ID="txtReAre" runat="server"></asp:TextBox>
<%--<asp:DropDownList ID="ddlRemovalArea" runat="server">
<asp:ListItem>-Select-</asp:ListItem>
<asp:ListItem>Bead</asp:ListItem>
<asp:ListItem>Tread</asp:ListItem>
<asp:ListItem>Sidewalk</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
<asp:ListItem>Tread life</asp:ListItem>
<asp:ListItem>Interior</asp:ListItem>
</asp:DropDownList>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="TirePosition">
<ItemTemplate>
<asp:TextBox ID="txtTireposition" runat="server"></asp:TextBox>
<%-- <asp:DropDownList ID="ddlTirePosition" runat="server">
<asp:ListItem>-Select-</asp:ListItem>
<asp:ListItem>Left Front</asp:ListItem>
<asp:ListItem>Right Front</asp:ListItem>
<asp:ListItem>Left Rear</asp:ListItem>
<asp:ListItem>Right Rear</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
<asp:ListItem>Trailer</asp:ListItem>
</asp:DropDownList>--%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText ="Product Code">
<ItemTemplate>
<asp:TextBox ID="txtProductCode" runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="ApprovalNumber">
<ItemTemplate>
<asp:TextBox ID="txtApprovalNumber" runat="server"></asp:TextBox>
</ItemTemplate>
<FooterStyle HorizontalAlign="Right" />
<FooterTemplate>
<asp:Button ID="ButtonAdd" runat="server" Text="Add New Row" />
</FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
</asp:Panel>
Protected Sub Page_Load(sender As Object, e As EventArgs)
If Not Page.IsPostBack Then
SetInitialRow()
End If
End Sub
Private Sub SetInitialRow()
Try
Dim dt As DataTable = New DataTable()
Dim dr As DataRow = Nothing
dt.Columns.Add(New DataColumn("ItemNo", GetType(String)))
dt.Columns.Add(New DataColumn("TireSize", GetType(String)))
dt.Columns.Add(New DataColumn("DOT", GetType(String)))
dt.Columns.Add(New DataColumn("RemovalArea", GetType(String)))
dt.Columns.Add(New DataColumn("TirePosition", GetType(String)))
dt.Columns.Add(New DataColumn("ApprovalNumber", GetType(String)))
dr = dt.NewRow()
dr("ItemNo") = 1
dr("TireSize") = String.Empty
dr("DOT") = String.Empty
dr("RemovalArea") = String.Empty
dr("TirePosition") = String.Empty
dr("ApprovalNumber") = String.Empty
dt.Rows.Add(dr)
ViewState("EmptyData") = dt
Dim ds As DataSet = New DataSet()
ds.Tables.Add(dt)
If (dt.Rows.Count > 0) Then
gdvItems.DataSource = ds
gdvItems.DataBind()
Else
gdvItems.DataSource = Nothing
gdvItems.DataBind()
End If
Catch ex As Exception
End Try
End Sub
Private Sub AddNewRowToGrid()
Dim rowIndex As Integer = 0
If ViewState("CurrentTable") IsNot Nothing Then
Dim dtCurrentTable As DataTable = DirectCast(ViewState("CurrentTable"), DataTable)
Dim drCurrentRow As DataRow = Nothing
If dtCurrentTable.Rows.Count > 0 Then
For i As Integer = 1 To dtCurrentTable.Rows.Count
Dim box1 As TextBox = DirectCast(gdvItems.Rows(rowIndex).Cells(1).FindControl("txtTireSize"), TextBox)
Dim box2 As TextBox = DirectCast(gdvItems.Rows(rowIndex).Cells(2).FindControl("txtDOT"), TextBox)
Dim box3 As TextBox = DirectCast(gdvItems.Rows(rowIndex).Cells(3).FindControl("txtReAre"), TextBox)
drCurrentRow = dtCurrentTable.NewRow()
drCurrentRow("RowNumber") = i + 1
dtCurrentTable.Rows(i - 1)("Column1") = box1.Text
dtCurrentTable.Rows(i - 1)("Column2") = box2.Text
dtCurrentTable.Rows(i - 1)("Column3") = box3.Text
rowIndex += 1
Next
dtCurrentTable.Rows.Add(drCurrentRow)
ViewState("CurrentTable") = dtCurrentTable
gdvItems.DataSource = dtCurrentTable
gdvItems.DataBind()
End If
Else
Response.Write("ViewState is null")
End If
SetPreviousData()
End Sub
Private Sub SetPreviousData()
Dim rowIndex As Integer = 0
If ViewState("CurrentTable") IsNot Nothing Then
Dim dt As DataTable = DirectCast(ViewState("CurrentTable"), DataTable)
If dt.Rows.Count > 0 Then
For i As Integer = 0 To dt.Rows.Count - 1
Dim box1 As TextBox = DirectCast(gdvItems.Rows(rowIndex).Cells(1).FindControl("txtTireSize"), TextBox)
Dim box2 As TextBox = DirectCast(gdvItems.Rows(rowIndex).Cells(2).FindControl("txtDOT"), TextBox)
Dim box3 As TextBox = DirectCast(gdvItems.Rows(rowIndex).Cells(3).FindControl("txtReAre"), TextBox)
Dim box4 As DropDownList = DirectCast(gdvItems.Rows(rowIndex).Cells(4).FindControl("ddlTireposition"), DropDownList)
box1.Text = dt.Rows(i)("Column1").ToString()
box2.Text = dt.Rows(i)("Column2").ToString()
box3.Text = dt.Rows(i)("Column3").ToString()
box4.Text = dt.Rows(i)("Column4").ToString()
rowIndex += 1
Next
End If
End If
End Sub
Protected Sub ButtonAdd_Click(sender As Object, e As EventArgs)
AddNewRowToGrid()
End Sub
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
Is there something related to AutoEventwireUp=False? If so why should it not be false?
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
I used a Calendar control in my ASP.Net code. I have three text boxes with three different calendar controls. But when I click on one calendar, other two calendars are also opening up. Also required field validators error messages are also showing beside the textboxes control.
Here is my code
<td width="34%"><asp:TextBox ID="txtClaimDate" runat="server" Width="100%" ></asp:TextBox>
<asp:ImageButton runat="Server" ID="img3" ImageUrl="~/Images/Calendar_scheduleHS.png"
AlternateText="Click to show calendar" /><br />
<cc1:CalendarExtender ID="CalClaimDate" runat="server" TargetControlID="txtClaimDate"
Format="yyyy-MM-dd" PopupButtonID="Image1">
</cc1:CalendarExtender>
</td>
<td width="16.5%">
<asp:TextBox ID="txtInDate" runat="server" Width="100%" />
<asp:ImageButton runat="Server" ID="Image1" ImageUrl="~/Images/Calendar_scheduleHS.png"
AlternateText="Click to show calendar" /><br />
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtInDate"
Format="yyyy-MM-dd" PopupButtonID="Image1">
</cc1:CalendarExtender>
</td>
<td width="16.5%">
<asp:TextBox ID="txtPuDate" runat="server" Width="100%" />
<asp:ImageButton runat="Server" ID="ImageButton1" ImageUrl="~/Images/Calendar_scheduleHS.png"
AlternateText="Click to show calendar" /><br />
<cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtPuDate"
Format="yyyy-MM-dd" PopupButtonID="Image1">
</cc1:CalendarExtender>
</td>
Now when I click on second calendar "txtIndate/CalendarExtender1" the other two calendar "txtClaimDate and txtPuDate" are opening up.
Please tell me how Can I stop this.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
I solved this upto one extend. I mean PopupbuttonId is same. It should be the image ID of their respective button. But now when I click on any calendar, It shows "*" for the fields. This means Requiredfieldsvalidator's error messages are "*" so it shows all the fields with "*". Please help in solving that.
Your help is much appreciated.
Thanks
Happy Coding!
|
|
|
|
|
i want to make controller and classes for getting a functionality like i have a notepad type text box and a button when i notepad manu write text and click add then data will be saved in my db with user id when write again that data will be added my previous data and show all data in a window
please reply fast i need very urgently and i will very very appreciate for this thanks
|
|
|
|
|
Hi all,
I am facing the issue with my zip file ,when i try to open the file from zipped folder then it does not open ,but when i try to open file after extract the folder and then open ,it works fine ,please help me to resolve the issue,here is the function that i am using to zip with Ionic.Zip dll
private void ExportToZip()
{
Response.Clear();
Response.ContentType = "application/zip";
Response.AddHeader("content-disposition", "filename=\"PnLBudgetExport.zip\"");
using (ZipFile zip = new ZipFile())
{
if (Directory.Exists(Server.MapPath(ZIP_FOLDER)))
{
foreach (string file in Directory.GetFiles(Server.MapPath(ZIP_FOLDER)))
{
zip.CompressionMethod = CompressionMethod.None;
zip.AddFile(file, string.Empty);
}
}
zip.Save(Response.OutputStream);
}
DeleteTempDir();
}
where ZIP_FOLDER ="~/ZipExport"
Please help me ,Thanks in advance.
|
|
|
|
|
I wanna work on an online shopping cart in asp dot net.any body join me in this project or give me best template themes ideas about this is soo appreciable....Thanks in advance
|
|
|
|