|
thnks it really worked. but dere is a problem when i bind data on !postback event does not fire. if i bind it without !postback den event gets fired. any suggestions
|
|
|
|
|
//You have to understand the postback functionality first:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//every single code written inside this will fire, only when page load or when redirected and from another page.
//the datas will be maintained here
}
//the code written here will be fired before each and every event is done.
//the data will change as per the old value and then the events like button click and others will be fired.
}
|
|
|
|
|
Hi want to go for cookie concept...,
When my user click a button a cookie have to save...,
after that if he click once agian another cookie also want to save with already existed cookie...,
and finally i want to get all the cookies...,
plz give me some idea reg this...,
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
i am using 2 textboxes and a checkbox and button:
//code for aspx.cs page:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
HttpCookie coo = Request.Cookies["Info"];
if (coo != null)
{
txtfirst.Text = coo["name"];
txtsecond.Text = coo["name1"];
}
}
}
protected void Button1_Click(object sender, EventArgs e)
{
if (CheckBox1.Checked == true)
{
HttpCookie cook = new HttpCookie("Info");
cook["name"] = txtfirst.Text.ToString();
cook["name1"] = txtsecond.Text.ToString();
cook.Expires = DateTime.Now.AddDays(1);
Response.Cookies.Add(cook);
}
}
//Add this line in web.config.
< sessionState
cookieless="UseCookies" />
|
|
|
|
|
|
|
its not what i asked dera,
i asked if cookie will be there with that new cookie also have to add
like insert concept...,not update concept
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
I currently have a website using master content technology. The Master page has two menus but only one is shown at a time. The problem I am having is that when rendering on IE 8, some browsers show the menu centered correctly on the page and other IE 8 browsers show the main menu starting at the center of the page. Below is the markup for the master page. Does anyone have any Ideas what the problem is?
<%@ Master Language="C#" CodeFile="Default.master.cs" Inherits="Default_master" %>
<%@ Import Namespace="System.Data.Odbc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head id="Head1" runat="server">
<title>Hans Engineering</title>
<link href="/White/NavButtons.css" type="text/css" rel="stylesheet"/>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Path="~/Scripts/AutoSave.js" />
<asp:ScriptReference Path="~/Scripts/Main.js" />
<asp:ScriptReference Path="~/scripts/Resources.js" />
</Scripts>
<Services>
<asp:ServiceReference Path="~/MessageBoardService.asmx" InlineScript="True" />
<asp:ServiceReference Path="~/UserService.asmx" InlineScript="True" />
</Services>
</asp:ScriptManager>
<div style="width:789px; height:150px">
<h1>Hans</h1>
<h2>Engineering WebSite</h2>
 <div style="left:40%;position:absolute">
<asp:Button ID="LinkButtonAjax" runat="server"
Text="AJAX ONLY" onclick="LinkButtonAjax_Click"></asp:Button>  <asp:Button
ID="LinkButtonASP" runat="server"
Text="STANDARD ASP" onclick="LinkButtonASP_Click"></asp:Button></div><br /><br /><br /><br /><br /><br /><br />
<div style="position:absolute; margin-left:100px">
<asp:menu id="menu" runat="server"
orientation="Horizontal"
maximumdynamicdisplaylevels="0"
skiplinktext=""
staticdisplaylevels="2"
Width="95%" Font-Bold="true" Font-Size="Small" StaticMenuItemStyle-HorizontalPadding="35" >
<Items>
<asp:MenuItem Text="Home" NavigateUrl="~/Default.aspx" />
<asp:MenuItem Text="Login" NavigateUrl="javascript:showLoginUser()" />
<asp:MenuItem Text="Register" NavigateUrl="~/Register.aspx" />
<asp:MenuItem Text="Discussions" NavigateUrl="~/Discussions.aspx" />
<asp:MenuItem Text="Forums" NavigateUrl="~/Forums.aspx" />
<asp:MenuItem Text="Administrative" />
<asp:MenuItem Text="Profile" NavigateUrl="~/UserProfile.aspx"/>
<asp:MenuItem Text="Help" />
</Items>
</asp:menu>
</div>
<div style="position:absolute; margin-left:100px">
<asp:menu id="menuASP" runat="server" Visible="false"
orientation="Horizontal"
maximumdynamicdisplaylevels="0"
skiplinktext=""
staticdisplaylevels="2"
Width="95%" Font-Bold="true" Font-Size="Small" StaticMenuItemStyle-HorizontalPadding="35" >
<Items>
<asp:MenuItem Text="Home" NavigateUrl="~/DefaultASP.aspx" />
<asp:MenuItem Text="Discussions" NavigateUrl="~/DiscussionsASP.aspx" />
<asp:MenuItem Text="Forums" NavigateUrl="~/ForumsASP.aspx" />
<asp:MenuItem Text="Administrative" />
<asp:MenuItem Text="Profile" NavigateUrl="~/UserProfileASP.aspx"/>
<asp:MenuItem Text="Help" />
</Items>
</asp:menu>
</div>
<div class="nav">
|
<asp:LoginStatus ID="LoginStatus1" Runat="server" />
</div>
</div>
<asp:contentplaceholder id="Main" runat="server" />
<div class="footerbg">
<div class="footer">
<asp:menu id="menub" runat="server"
orientation="Horizontal"
maximumdynamicdisplaylevels="0"
skiplinktext=""
staticdisplaylevels="2" />
Copyright © 2009 Hans Holdorf.
</div>
</div>
</form>
</body>
</html>
|
|
|
|
|
I would expect that ASP.NET doesn't know how to deal with the js quirks in IE8 yet. I would try to change your CSS, do things differently until it works. I'd also google for info, it's odd that IE8 would work differently for different users.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Actually, after further testing the problem is not with IE 8. The menu rendering incorrectly is with IE 7. I had my source check their version of IE and they are in fact haveing problems with IE 7. Still the problem remains. Any suggestions?
Thanks,
Steve
|
|
|
|
|
Ultimately, it means that IE7 has the issue, and you need to work out what the issue is, and change your script accordingly. Welcome to the hell of web development.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
To resolve this problem you have to write only one line in your section of that page where you had placed menu control.
SOLUTION:
Try it. might resolve your problem.
Regards
Keyur Satyadev
|
|
|
|
|
I am using asp.net with C# language.
I want a code through which i can create a table in oracle 9i database through user interface (asp.net) with C# language. After creation of a new table in database, I should even be able to insert data in it through user interface itself.
I am urgently in need of it.
Please somebody help me out in this code.
|
|
|
|
|
Maybe you are looking for this[^]
|
|
|
|
|
Ashwini.dg wrote: I want a code through which i can create a table in oracle 9i database through user interface (asp.net) with C# language. After creation of a new table in database, I should even be able to insert data in it through user interface itself.
Buy some ASP.NET Books and start reading.
Ashwini.dg wrote: I am urgently in need of it.
Not for All.
|
|
|
|
|
Search of g.cn, you'll to browse Oracle example! www.oracle.com
|
|
|
|
|
Ok, I suppose I should preface my question by stating that I am a complete noob at this so keep that in mind
What is wrong with this line:
<h2><%= Request.QueryString("FirstName") %> <%= Request.QueryString("LastName") %></h2>
I keep getting this message:
Error 5 Non-invocable member 'System.Web.HttpRequest.QueryString' cannot be used like a method.
This line is nearly identical to an example I found on msdn. What am I missing here?
Thanks
|
|
|
|
|
<h2><%= Request.QueryString["FirstName"] %> <%= Request.QueryString["LastName"] %></h2>
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
I imagine the example was in VB, not C#
|
|
|
|
|
Because the "Request.QueryString("FirstName")" used "()", vs has it's a method. so your used "[]" and it's OK.
|
|
|
|
|
I have an application that is written in c++ and I have an asp.net webservice (c# behind) that has two methods. One of the methods is a file upload, where the goal is to pass a file via the web service to the application.
I have found various examples on how to do file transfers but my webservice will not have write permission to the machine. So I need to take the byte[] that is essentially the file, serialize it, and send it to my application.
I have the majority of the code but I am lost on two aspects:
1) I not sure how to take the byte[] and serialize it.
2) I am not sure what I would need to do in my C++ app to accept the serialized XML with the byte array, meaning how do I decode the byte array.
Any suggestions?
|
|
|
|
|
Are you sure you need to do all of this just to circumvent the permissions issue? I mean a simple permission change will solve the problem right?
|
|
|
|
|
I wish more than anything that I could implement the permission change. Unfortunately, the web service will be a corporate webservice applied in different locations and I have been mandated that there are to be no permissions in writing to the drive.
|
|
|
|
|
Al_Pennyworth wrote: and I have been mandated that there are to be no permissions in writing to the drive.
However you are going to write the the drive anyway by circumventing the problem with a Rube Goldberg[^] implementation? You gotta love corporate culture!
Good luck you're going to need it.
|
|
|
|